EncryptCodecencryptcodec
Tools/Url Encoder

URL Encoder / Decoder

Percent-encode and decode URLs. Use Component mode for encoding query values and path segments. Use Full URL mode to encode a complete URL while preserving its structure.

All processing happens in your browser — nothing is sent to our servers

encodeURIComponent vs encodeURI

encodeURIComponent encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ) — use this for query parameter values and path segments. encodeURI additionally preserves ; , / ? : @ & = + $ # — use this when encoding a full URL. Common mistake: using encodeURI on a query value will leave & and = unencoded, breaking the query string.

How it works
URL Percent-Encoding / Decoding
Encode
01Input string

Text to encode — typically a URL component: query parameter, path segment, or fragment

02Character check

Unreserved characters (A–Z, a–z, 0–9, -, _, ., ~) are passed through unchanged per RFC 3986

03UTF-8 bytes

All other characters (spaces, Unicode, symbols) converted to their UTF-8 byte sequence

04Percent-encode

Each byte written as %XX where XX is the uppercase hexadecimal value — e.g. space → %20

05encodeURI vs encodeURIComponent

encodeURI preserves :, /, ?, #, & for full URLs. encodeURIComponent encodes everything for safe embedding in a query string.

Decode
01Encoded string

String containing %XX sequences — from a URL, form submission, or API response

02Scan for %

Each '%' followed by two hex digits is identified as an encoded byte

03Hex → byte

Each %XX converted to its numeric byte value — e.g. %20 → 0x20 (32 decimal)

04UTF-8 decode

Consecutive encoded bytes assembled and decoded as UTF-8 — handles multi-byte Unicode sequences

05Output

Human-readable string with all percent-encoded sequences replaced by their original characters

Spec: RFC 3986 §2.1 (percent-encoding), RFC 3987 (IRI), WHATWG URL Standard

Frequently Asked Questions

Keep learning

Encoding Chain
Master URL encoding in a game
Game
URL Encoding Guide
encodeURIComponent vs encodeURI explained
Guide