Skip to main content

URL Encoder / Decoder

Encode or decode URLs instantly in your browser. Supports RFC 3986, form encoding, and batch multi-line processing — no data ever leaves your device.

How to use

Paste your text or URL in the Input area. Select Encode or Decode mode — the result updates instantly as you type. Use ⇄ Swap to reverse input and output. Choose Standard (RFC 3986) to percent-encode reserved characters, or Form Encoded to use + for spaces (suitable for application/x-www-form-urlencoded). Enable Batch Mode to process each line independently. All processing runs entirely in your browser — your data is never sent to a server.

What is URL encoding?

A URL may only contain a limited set of characters. Spaces, accented letters, emoji and characters that have a meaning in URLs (?, &, =, #, /) must be written as percent-encoded bytes when they are part of a value: a % followed by two hexadecimal digits. A space becomes %20, & becomes %26 and é becomes %C3%A9, its two UTF-8 bytes.

You need it when you put user input into a query string, build redirect or callback URLs, debug an API request, or read a link that arrived full of % signs.

How it works

Standard (RFC 3986) mode encodes every character except the unreserved ones: letters, digits and - _ . ! ~ * ' ( ). It works like JavaScript's encodeURIComponent, which is what you want for a single query-string value or path segment.

Form encoded mode writes spaces as + instead of %20, as HTML forms do when they submit application/x-www-form-urlencoded data. When decoding in this mode, + is read as a space.

Batch mode treats every line as a separate value, so you can encode or decode a list in one go. The result updates as you type, and everything happens in your browser.

Examples

Text Encoded (standard) Encoded (form)
hello world hello%20world hello+world
a&b=c a%26b%3Dc a%26b%3Dc
café caf%C3%A9 caf%C3%A9
50% 50%25 50%25
https://example.com/?q=1 https%3A%2F%2Fexample.com%2F%3Fq%3D1 same

The last row shows a full URL encoded as a value, for example to pass it as a redirect= parameter.

Limitations

  • The tool encodes the whole input as one value. Encoding a complete URL also encodes its :, / and ?, so encode only the parts that are values, not the whole address.
  • Decoding fails on a malformed sequence such as a lone % or %ZZ; the error says so.
  • Text is encoded as UTF-8, the standard for URLs today. Legacy encodings such as Latin-1 (%E9 for é) are not supported.

Frequently asked questions

What is the difference between %20 and + for a space?

Both mean a space, in different places. %20 is valid everywhere in a URL. + means a space only in form-encoded query strings (application/x-www-form-urlencoded); in a path, a + is a literal plus sign. When in doubt, use %20.

Should I encode the whole URL?

No, only the values you insert into it, such as a search term or a redirect address. Encoding the whole URL turns https:// into https%3A%2F%2F, which is only right when the entire URL is itself a parameter value inside another URL.

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves characters that structure a URL (: / ? # & =) alone and is meant for a whole URL. encodeURIComponent encodes them too and is meant for a single value. This tool's standard mode behaves like encodeURIComponent.

Why does my decoded text show strange characters like é?

The text was encoded as UTF-8 but decoded as Latin-1 somewhere else, or encoded twice. Try decoding again: %25C3%25A9 is a double-encoded é and needs two passes.

How are emoji and non-Latin characters encoded?

Each character is turned into its UTF-8 bytes and every byte is percent-encoded. 😀 becomes %F0%9F%98%80 (four bytes) and д becomes %D0%B4.

Is my data sent anywhere?

No. Encoding and decoding run in your browser. Nothing you paste is uploaded, logged or stored.