💻 Developer Tools

URL Encoder & Decoder

Encode text for URL components or decode percent-encoded values.

Ready to use · Runs in your browser · No signup
Loading tool…

How to use the URL Encoder & Decoder

Encode characters for safe use in a URL component or decode percent-encoded text back to a readable string.

Percent-encode text for use in a URL component or decode percent-encoded sequences for inspection. The tool focuses on components, because encoding an entire URL can incorrectly hide structural separators.

Input stays in the browser and is not sent to Fieldlet. Do not treat a formatting, encoding, test, or generated value as a substitute for security review.

  1. Choose Encode or Decode.
  2. Enter the source text or encoded value.
  3. Fieldlet applies the browser's URI-component encoding or decoding function.

Last reviewed for accuracy:

Worked examples

Encode a query value

Scenario: The value summer sale & deals is prepared for a query parameter.

Result: The component becomes summer%20sale%20%26%20deals.

Spaces and the ampersand are encoded so they cannot be mistaken for URL query structure.

How the result is produced

Encoding converts UTF-8 text into percent-escaped bytes where required by URL-component rules. Decoding reverses valid percent sequences and reports malformed escapes.

  • Encode a parameter value separately from its name and separators
  • A percent escape uses % followed by two hexadecimal digits
  • Plus-as-space behavior belongs to form encoding and is not universal URL decoding

Encode data without hiding URL structure

A query value must not be allowed to introduce its own ampersand, equals sign, or fragment marker. Encoding the value separately protects those boundaries while leaving the URL's deliberate separators readable to the parser.

  • Encode each dynamic component before assembly.
  • Do not use percent encoding as a security trust decision.
  • Remember that plus signs are not universally decoded as spaces.

References

These primary references document standards or definitions used in the explanation above.

Limitations and common mistakes

  • Percent encoding does not make an untrusted URL safe to navigate.
  • International domain names and complete URL normalization require additional hostname and parser rules.

Common questions

Does this encode a whole URL?

It uses URL-component encoding, which is best for query values and individual URL parts rather than blindly encoding an entire URL structure.

Should I encode the whole URL?

Usually no. Encode individual path segments or query values so characters such as colon, slash, question mark, equals, and ampersand can retain their structural roles.