inyourbrowser.com

URL Encoder / Decoder

URL encoder and decoder is a data tool that percent-encodes special characters in URLs and reverses the operation. It supports full-URL and component-level encoding, decodes server-log URLs, and parses query strings into readable key-value pairs. The tool runs in your browser.

Input
Output

URL TOOLS

URL Encode

Encodes special characters using percent-encoding (encodeURIComponent). Safe for use in query string values.

Runs entirely in your browser

How to URL-encode or decode text

  1. Choose "Encode" to percent-encode special characters, or "Decode" to reverse the process.
  2. Paste your URL or query string into the input area.
  3. The encoded or decoded result appears immediately.
  4. Click "Copy" to copy the result to your clipboard.

Common uses

  • Encoding query string parameters that contain spaces or special characters, use Base64 encoding when you need to embed binary data in the URL instead
  • Decoding percent-encoded URLs from server logs or redirects to make them readable
  • Building URLs programmatically and ensuring special characters are properly escaped, also useful with HTML entity encoding for safe output in web pages

Technical specification

  • Algorithm or formula: Percent-encoding per RFC 3986. Component-level mode uses encodeURIComponent; full-URL mode uses encodeURI to preserve scheme, slashes, and reserved delimiters. Decode uses decodeURIComponent.
  • Browser API or library: Native encodeURI, encodeURIComponent, decodeURIComponent, and URLSearchParams for query-string parsing.
  • Input limits: No hard cap; tested at 1 MB inputs without delay.
  • Output: Encoded or decoded string in the output pane. Query-string mode returns a parsed key-value table.
  • Known limitations: Malformed percent escapes during decode throw a URIError, surfaced as an inline error message. Encoding does not handle internationalised domain names (IDN/Punycode); use the IDN ToASCII algorithm beforehand if needed.

Frequently asked questions

What is URL encoding?
URL encoding (percent encoding) converts characters not safe in URLs, like spaces, ampersands, and accented letters, into a percent sign followed by two hex digits. For example, a space becomes %20.
When should I encode the full URL vs just the query value?
Encode individual query parameter values, not the full URL. Encoding the entire URL will break the scheme and path structure.
Is my data sent to a server?
No. Encoding and decoding happen entirely in your browser using JavaScript.
What characters are safe in URLs without encoding?
Letters (A-Z, a-z), digits (0-9), and the characters hyphen, underscore, period, and tilde are unreserved and never need encoding.

Reviewed and tested May 26, 2026.