AIForeverThing

URL Encoder / Decoder

Encode text to percent-encoded URLs or decode percent-encoded strings instantly. Everything runs locally in your browser — nothing is sent to any server.

Encode (text → percent-encoded)

Enter text and press Encode.

Decode (percent-encoded → text)

Enter percent-encoded text and press Decode.

How it works

URL percent-encoding replaces every byte of an unsafe character with % followed by two uppercase hexadecimal digits. Non-ASCII text is first converted to UTF-8, then each byte is encoded independently — so é becomes %C3%A9. The browser uses encodeURIComponent() for values (which encodes reserved characters like / : # & =) and decodeURIComponent() to reverse the process. Invalid escape sequences like %ZZ are detected and reported as errors.

Frequently asked questions

What is URL encoding (percent-encoding)?

URL encoding converts characters into a safe format for internet transmission by replacing each unsafe character with a percent sign (%) and two hexadecimal digits representing its byte value. For example, a space becomes %20, and @ becomes %40. It prevents special characters from breaking URLs or being misinterpreted by servers.

Which characters must be URL encoded?

Spaces, quotes, angle brackets, backslashes, braces, pipes, and reserved characters such as ? # & = : / must be encoded when they appear in user-provided values. Non-ASCII characters (accents, emojis, CJK) are converted to UTF-8 first, then each byte is percent-encoded.

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes every special character, including reserved ones like :/?#[]@!$&'()*+,;=, so it is ideal for encoding individual query values. encodeURI leaves reserved characters untouched so the overall URL structure stays intact. When encoding a single parameter value, encodeURIComponent is almost always the right choice.

Free tools by TUNA — energy supply from vetted manufacturers