URL Encoder / Decoder
Encode URL components with percent encoding or decode encoded text directly in your browser.
Encode or decode URL components
Convert text with percent encoding locally in your browser.
Your input is encoded or decoded locally in your browser and is not sent to a server.
Overview
What is URL encoding?
URL encoding, also called percent encoding, represents characters with a percent sign followed by hexadecimal byte values. It lets text such as spaces, punctuation, Unicode, and emoji travel safely inside a URL component.
This tool applies URL component semantics. It encodes the value you provide and does not parse, normalize, or rewrite a complete URL.
Encode
How to encode a URL component
- Enter text or a component value in Text or URL Component.
- Choose Encode.
- Select Encode URL.
- Copy the percent-encoded output into the appropriate URL component.
Decode
How to decode URL-encoded text
- Paste percent-encoded text into Encoded Input.
- Choose Decode.
- Select Decode URL.
- Review or copy the decoded output.
Example
URL encoding example
Text
hello world & 你好 👋Percent encoded
hello%20world%20%26%20%E4%BD%A0%E5%A5%BD%20%F0%9F%91%8BJavaScript
encodeURI vs encodeURIComponent
encodeURI is designed for a complete URI and preserves structural characters such as /, ?, and &. encodeURIComponentescapes those separators so one value can be safely placed inside a URL component.
Orbilyra uses encodeURIComponent and decodeURIComponent. It does not attempt to identify or rewrite the hostname, path, query, or fragment of a full URL.
Comparison
URL encoding vs Base64
URL encoding protects reserved or unsafe characters inside URL components. Base64 represents arbitrary bytes with a text alphabet. Neither is encryption, and they solve different transport problems.
To work with Base64 text, use theBase64 Encoder / Decoder.
Details
Understanding percent encoding
Each encoded byte is written as %XX, where XX is a hexadecimal value. A space becomes %20. Characters outside ASCII are first represented as UTF-8 and can therefore produce several percent sequences, as Chinese text and emoji do.
Decoding is performed exactly once. For example, decoding %2520 produces%20, not a space.
Forms
Form encoding and plus signs
HTML form submissions using application/x-www-form-urlencoded often represent spaces with a plus sign. This tool follows JavaScript URL component semantics: spaces are encoded as %20, and a literal plus sign is not automatically decoded as a space.
Workflows
Common URL encoding use cases
- Encode a query parameter value that contains spaces, punctuation, or Unicode text.
- Inspect percent-encoded values copied from logs, callbacks, or API requests.
- Prepare one path, query, or fragment component without rewriting a complete URL.
- Debug malformed percent sequences and accidental double encoding.
FAQ
Frequently asked questions
What is URL encoding?
URL encoding represents characters with percent-encoded UTF-8 bytes so text can be safely used in a URL component such as a query parameter value.
What is percent encoding?
Percent encoding writes a byte as a percent sign followed by two hexadecimal digits. For example, a space is encoded as %20.
What is the difference between encodeURI and encodeURIComponent?
encodeURI preserves URL syntax such as slashes and query separators, while encodeURIComponent also escapes those characters for use inside an individual URL component. This tool uses encodeURIComponent.
Why are spaces encoded as %20 instead of +?
Percent encoding represents a space as %20. HTML form encoding may use + for spaces, but this tool follows URL component semantics and does not convert plus signs to spaces.
Is my input uploaded to a server?
No. Encoding and decoding happen locally in your browser, and this tool does not send your input to a server.
Why does URL decoding fail?
Decoding fails when a percent sequence is incomplete, contains non-hexadecimal characters, or does not represent valid UTF-8. Fix the malformed sequence and try again.