Skip to content

URL Encoder & Decoder Online Free

Last verified May 2026 — runs in your browser
Input
Output

URL Percent-Encoding Tool

Paste a string and the tool percent-encodes any character outside the unreserved ASCII set so the result is safe to drop into a URL, a query string, a form body, or a header value. Paste a percent-encoded string and toggle to decode mode to recover the original text, with UTF-8 bytes decoded back to the correct multi-byte characters.

Two modes cover the two real-world needs: Component mode uses encodeURIComponent, escaping reserved characters like :, /, ?, #, &, and = — use this when building a single query-string value, a path segment, or any fragment that should survive intact inside a larger URL. Full URI mode uses encodeURI, which preserves URL structural characters — use this when you have a full URL that needs only its special characters (spaces, accented letters) escaped.

This is the tool for debugging a URL that 404s because of mis-encoded characters, preparing a redirect target that itself contains a URL, cleaning up a pasted URL with %20 and %2F so you can read it, building a share link for content with non-ASCII characters, or round-tripping a query string parameter through a log-paste-and-read loop. A swap button flips direction instantly and the output can be copied with a single click.

Encoding and decoding run purely in the browser — no upload and no server request.

About this tool

URL encoding (percent-encoding) replaces unsafe characters with % followed by two hex digits. Component mode encodes all special characters, while URI mode preserves characters like :, /, and ? that are valid in URLs.

  • encodeURIComponent and encodeURI modes
  • Real-time encoding/decoding
  • Swap input and output
  • Copy result to clipboard

100% client-side. Your inputs never leave your browser. Ads via AdSense (consent required).

Frequently asked questions

How do I URL-encode or decode a string?

Paste the string and pick encode or decode; the tool applies encodeURIComponent for encoding and decodeURIComponent for decoding. Every character that isn't a URL-safe unreserved character (letters, digits, -, _, ., ~) becomes percent-escaped (%20 for space, %3A for colon, %C3%A9 for é as UTF-8). Decoding reverses this so you can read what a raw query string actually contains.

Is the URL encoder free?

Yes, fully free, no signup, no usage cap. Encode and decode as many strings as you need — useful for building query parameters, inspecting redirect chains, debugging OAuth callback URLs. JSONCraft is free across every tool including this one; no premium feature gate applies.

Does the URL encoder upload my input?

No. Encoding and decoding run in your browser using native JavaScript functions. Nothing is transmitted — useful because URLs often carry session tokens, signed query parameters or access tokens you don't want logged anywhere else. You can paste a production callback URL safely to inspect it.

What's the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL and leaves reserved URL characters alone (:, /, ?, #, =, &) because they have structural meaning. encodeURIComponent encodes every reserved character because it assumes you're encoding a single component (a query value, a path segment) that must not be mistaken for URL structure. This tool uses encodeURIComponent by default — the right choice when you're building one parameter at a time.

When should I URL-encode versus HTML-encode?

URL-encode when the string is going into a URL (query string, path segment, data URL). HTML-encode when it's going into HTML markup (inside a tag or attribute) to prevent script injection. They are different escape layers — a value can need both if it's going into an HTML attribute that holds a URL. This tool handles the URL layer; HTML encoding is separate and uses <, >, & etc.