URL Encoder / Decoder

Percent-encode text for URLs, or decode it back. Component, URI, or form-encoded — pick the right mode.

URL encoding, both directions. Encode text for safe URL transport, or decode percent-escaped input. Three modes for different contexts. How to use ↓·Shortcuts ↓
Text or URL → percent-escaped.
Mode:Escapes everything reserved. Use for query values, path segments.
Samples:
Text / URL Input
Encoded Output
Output will appear here.
Input: 0 chars · 0 bytesOutput: 0 chars · 0 bytes

How to use

Pick a direction with the tabs — Encode or Decode. Paste your input on the left. The output appears on the right as you type.

Choose the right encoding mode: Component for a single query value or path segment, URI for a full URL where you want to keep : / ? # & etc. intact, or Form for form-post bodies (spaces become +).

Keyboard shortcuts

Three shortcuts:

Cmd / Ctrl + KFocus the input pane
Cmd / Ctrl + EnterCopy output to clipboard
Cmd / Ctrl + /Toggle between Encode and Decode

When to use it

URL encoding is required whenever text goes into a URL and might contain characters URLs treat specially.

  • Building a query string from arbitrary user input.
  • Encoding a redirect target passed as a query parameter.
  • Escaping a filename or path segment that might contain spaces or special chars.
  • Decoding a URL you received in a log or an email — %20 back to space, %3F back to ?.

Options

ComponentencodeURIComponent. Escapes everything reserved. Use for a single query value or path segment. This is what you want 90% of the time.

URIencodeURI. Preserves URL-structural characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =). Use when the input is a whole URL you want to escape without breaking its structure.

Formapplication/x-www-form-urlencoded. Same as Component but spaces become +. Use for form-post bodies.

Format-specific gotchas

Component and URI differ where it matters. Given a=b&c=d, Component escapes & and = (making the whole string one value); URI preserves them. Pick based on what your string represents.

Form uses + for space, not %20. Server-side decoders differ — some (application/x-www-form-urlencoded parsers) accept both; some (path decoders) treat + as a literal plus. Match the encoding mode to the target.

Decode fails on malformed input. A lone % or an incomplete escape like %2 throws a URIError. The tool surfaces the message.

Non-ASCII becomes UTF-8 bytes. é encodes to %C3%A9, not %E9. Legacy Latin-1 systems will misread it.

Privacy

Everything runs in your browser. Your text never leaves the page — no server, no logging, no analytics on the content.

Frequently asked questions

What is URL encoding?
A scheme for representing characters that are not URL-safe as percent-escapes: %20 for space, %3F for ?, and so on. Required because URLs can only carry a limited ASCII subset.
Component vs URI mode — which do I pick?
Component (encodeURIComponent) escapes everything reserved — use it for a single query value or path segment. URI (encodeURI) preserves URL structure characters like /, ?, #, & — use it when the input is a full URL you want to escape without breaking it.
Why does Form mode use + for spaces?
Historical convention from HTML form submission. application/x-www-form-urlencoded bodies use + for space and %20 for a literal plus. Query-string decoders in most languages accept both; path decoders often do not.
What does %C3%A9 mean?
UTF-8 percent-encoding for é. Modern URL encoders always output UTF-8 byte sequences. Legacy Latin-1 systems would encode é as %E9 — this tool always uses UTF-8.
Why did Decode throw a URIError?
Input contains a malformed percent-escape — a lone % without two hex digits after it, or a hex sequence that would produce invalid UTF-8. Fix the input or ask where it came from.
Does the tool send my text anywhere?
No. All encoding and decoding happens in your browser. The input never leaves the page.