Skip to content
DN
Esc
  • JSON FormatterBeautify, minify and validate JSON instantly as you type.
  • Base64 Encoder/DecoderConvert text to Base64 and back, with full Unicode support.
  • UUID GeneratorGenerate random v4 UUIDs — one or many — in the format you need.
  • JWT DecoderDecode JSON Web Tokens to inspect the header, payload and expiry.
  • Timestamp ConverterConvert Unix timestamps to dates and dates to timestamps.
  • URL Encoder/DecoderPercent-encode and decode URLs, and break down query strings.
  • Hash GeneratorGenerate MD5, SHA-1, SHA-256 and SHA-512 hashes of text or files.
  • Regex TesterTest regular expressions with live match highlighting and groups.

↑ ↓ to moveEnter to openPaste data to open it in the right tool. Nothing leaves your browser.

URL Encoder & Decoder

Percent-encode text for URLs or decode it back, live as you type. Paste a full URL to see its parts and query parameters.

Last updated

Treat input as

Component mode encodes every reserved character (like / ? & =) — use it for a single query value or path segment.

Text or URL

Encoded

The result appears here as you type

How to use the URL Encoder/Decoder

  1. Choose a direction

    Select Encode to make text URL-safe, or Decode to turn percent-encoding back into text.

  2. Pick the scope

    Use Component for a single value or path segment, or Full URL to keep characters like / ? & intact.

  3. Paste your text

    The result appears instantly. Turn on form encoding if spaces should be written as +.

  4. Inspect the URL

    For full URLs, check the breakdown and the query parameter table, and copy any value.

Features

  • Live encoding and decoding as you type
  • Component mode (encodeURIComponent) or Full URL mode (encodeURI)
  • Optional form encoding: spaces become + when encoding, and + becomes a space when decoding
  • URL breakdown showing the protocol, host, port, path, fragment and origin
  • Query parameter table with decoded values, one-click copy, and quick actions for values that contain a JWT, JSON or a timestamp
  • UTF-8 support for non-English characters and emoji
  • Clear errors for malformed percent-encoding, and a swap button to reverse the conversion
  • Keyboard shortcuts: Ctrl/Cmd + Enter copies the result, Ctrl/Cmd + S downloads it

Is my URL sent anywhere?

No. Encoding, decoding and the URL breakdown use your browser's built-in encodeURIComponent, encodeURI, decodeURIComponent, decodeURI and URL functions. The URLs you paste — including any tokens in their query strings — stay on your device.

Read the DevNest privacy policy

Examples

  • Encode a query value

    Component mode encodes characters like & so the value can't break the URL.

    Text

    fish & chips

    Encoded

    fish%20%26%20chips
  • Decode percent-encoded text

    Multi-byte UTF-8 sequences decode back to accents and emoji.

    Encoded

    caf%C3%A9%20%E2%98%95

    Decoded

    café ☕
  • Inspect a URL's query parameters

    Paste a full URL to see each parameter decoded in a table.

    URL

    https://shop.example.com/search?q=red%20shoes&page=2&sort=price

    Query parameters

    q = red shoes
    page = 2
    sort = price

Understanding URL encoding

What is URL encoding?

URL encoding, also called percent-encoding (RFC 3986), replaces characters that aren't allowed in a URL — or that have a special meaning there — with a % followed by two hexadecimal digits for each byte of the character's UTF-8 encoding.

space  →  %20
&      →  %26
é      →  %C3%A9
😀     →  %F0%9F%98%80

Why URL encoding is needed

Some characters structure a URL: ? starts the query string, & separates parameters, = separates a key from its value, # starts the fragment and / separates path segments. If a value contains one of them, it has to be encoded, or the URL will be read differently from what you intended.

Searching for: fish & chips

Broken:   /search?q=fish & chips
Correct:  /search?q=fish%20%26%20chips

URL encoding vs URL decoding

Encoding turns text into its percent-encoded form so it can be placed safely in a URL; decoding reverses it so you can read it. Apply each exactly once: encoding text that's already encoded produces double encoding — a space becomes %2520 instead of %20 — which is a common source of bugs.

URL components vs complete URLs

AspectComponent modeFull URL mode
JavaScript functionencodeURIComponent()encodeURI()
Encodes / ? & = # :YesNo — they're kept as URL structure
Use it forA single query value or path segmentA whole URL that should keep working
Example: a b&ca%20b%26ca%20b&c

Query parameters

The query string is the part of a URL after ?: a list of key=value pairs separated by &. Values are percent-encoded, and HTML forms usually write spaces as +. When you paste a full URL, DevNest lists every parameter with its decoded value (using the browser's URLSearchParams, which also turns + into a space), so a query like ?q=hello+world&a=%C3%A9 reads as hello world and é.

Frequently asked questions

Should spaces be encoded as %20 or +?

In most of a URL, spaces are encoded as %20. In HTML form submissions (application/x-www-form-urlencoded), spaces in the query string are written as +. Turn on form encoding to use + for spaces and to decode + back into spaces.

Which characters are never encoded?

Letters, digits and - _ . ~ are never encoded. encodeURIComponent also leaves ! ' ( ) * unchanged, and encodeURI additionally keeps the characters that give a URL its structure.

Why do I get an error when decoding?

The input contains a % sign that isn't followed by two valid hexadecimal digits, or a sequence that isn't valid UTF-8. A literal percent sign must itself be encoded as %25.

Does URL encoding work with non-English text?

Yes. Characters are encoded as their UTF-8 bytes, so text in any language and emoji can be encoded and decoded.

Is URL encoding the same as encryption?

No. URL encoding only makes text safe to include in a URL. Anyone can decode it, so it provides no security or privacy.