DeveloperKit

URL Encoder / Decoder

Percent-encode or decode URLs, query values, and form data, and unwrap double-encoded strings from logs. Free, private, and 100% in your browser.

encodeURIComponent: for a single query value or path segment. Reserved characters such as / ? & = # are encoded.

Text or URL to Encode

0 characters

Encoded Result

Encode and Decode URLs Online

URLs can only contain a limited set of ASCII characters. Everything else, including spaces, accents, and characters such as &, ?, and # inside a value, must be percent-encoded. This tool encodes text the same way browsers and JavaScript do, and decodes encoded strings back into readable text.

Encoding a query value
café & crème?   →   caf%C3%A9%20%26%20cr%C3%A8me%3F

Features

  • Three encoding modes

    Component (encodeURIComponent) for single values, Full URL (encodeURI) to keep the structure, and Form encoding with + for spaces like HTML forms and URLSearchParams.

  • Unwraps nested encoding

    Strings that were encoded two or three times (%2520, %253A) are decoded in one step, and the tool tells you how many layers it removed.

  • Never crashes on bad input

    A stray % or invalid UTF-8 does not throw an error like decodeURIComponent: the rest is decoded and each problem is shown with its line and column.

  • Full UTF-8 support

    Accents, emoji, and non-Latin scripts are encoded as UTF-8 bytes, exactly like browsers do.

  • Line by line

    Encode a list of values one per line while keeping the line breaks, handy for bulk work on parameters.

  • Private by design

    Encoding and decoding run in your browser. Tokens and URLs from your logs never leave your device.

How to Encode or Decode a URL

  1. Choose Encode or Decode.
  2. Paste your text, URL, or encoded string. The result updates as you type.
  3. For encoding, pick Component for a single value or Full URL for a whole address.
  4. Copy the result, or press Swap to reverse the operation and check the round trip.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) replaces characters that are not allowed or have a special meaning in URLs with a % followed by two hexadecimal digits of their UTF-8 bytes. A space becomes %20, & becomes %26, and é becomes %C3%A9.

What is the difference between encodeURI and encodeURIComponent?

encodeURI is meant for a complete URL and keeps characters such as : / ? # & = that structure it. encodeURIComponent is meant for a single part, such as one query value, and also encodes those characters, so a value containing & or = cannot break the URL. When in doubt, encode each value with encodeURIComponent.

Should spaces be encoded as %20 or +?

Both are common. %20 works everywhere in a URL. + means a space only in query strings that use the application/x-www-form-urlencoded format, such as HTML form submissions and URLSearchParams. In a path, + is a literal plus sign.

Why does my URL contain %2520?

It was encoded twice: the space became %20, and then the % of %20 was encoded again as %25. This usually happens when an already-encoded value is passed through another encoding step. Turn on "Decode nested encoding" to unwrap all layers at once.

Why does decodeURIComponent throw "URI malformed"?

It throws when the input contains a % that is not followed by two hex digits (like "100%") or bytes that are not valid UTF-8 (often text that was encoded as Latin-1). This tool decodes everything else and shows exactly where the problem is.

  • URL Parser

    Break a URL into protocol, host, port, path, and fragment, and edit its query parameters as a key-value table.

  • User-Agent Parser

    Identify the browser, operating system, device type, and bots from any User-Agent string, one or thousands at once.

  • cURL to Fetch / Axios

    Convert cURL commands, including Copy as cURL from DevTools, into JavaScript fetch() or axios code.

  • HTTP Status Codes

    Search every HTTP status code, from 200 OK and 404 Not Found to 418 I'm a teapot, with causes and fixes.