URL Encoder

Encode or decode URL components and query strings.

About URL Encoder

URL encoding — also called percent-encoding — is the process of converting characters that are not safe for use in URLs into a format that browsers, servers, and HTTP clients can reliably transmit. Characters like spaces become %20, ampersands become %26, and accented letters like é become %C3%A9. Without proper encoding, URLs break in transit: spaces in query parameters cause malformed requests, special characters get misinterpreted by routers and proxies, and security vulnerabilities like URL injection can open up. This free online URL encoder and decoder handles both directions: encode any string for safe inclusion in a URL, or decode a percent-encoded string back to human-readable form. The tool supports both full URL encoding (preserving structural characters like /, ?, and &) and component-level encoding (converting everything except unreserved characters — useful for individual query parameter values). Everything runs locally in your browser using JavaScript's native encodeURIComponent() and decodeURIComponent() functions — no data is transmitted.

How to Use URL Encoder

  1. Select Encode or Decode: Choose whether you want to encode a string for URL use or decode a percent-encoded URL string back to readable text.
  2. Paste or Type Your Input: Enter the string you want to encode, or paste the percent-encoded string you want to decode.
  3. Copy the Result: The output appears instantly. Click Copy to use it in your terminal, API client, code, or browser address bar.

Key Features

  • Encode Any String for URL Safety: Convert spaces, special characters, Unicode, and non-ASCII text into percent-encoded form safe for use in URLs, query parameters, form data, and HTTP headers.
  • Decode Percent-Encoded URLs: Convert %XX sequences back to readable characters. Instantly understand what a percent-encoded URL string actually says — useful for reading log files, debugging redirects, and inspecting API request parameters.
  • Component vs Full URL Mode: Choose between encodeURIComponent (encodes everything except unreserved characters — for individual query values) and encodeURI (preserves structural URL characters — for full URL strings).
  • Live Conversion: Output updates instantly as you type or paste. No button press needed — see the encoded or decoded result in real time.
  • Copy to Clipboard: One-click copy sends the encoded or decoded result to your clipboard, ready to paste into a browser, terminal command, API client, or config file.
  • Runs Entirely in Your Browser: Uses JavaScript's native encodeURIComponent() and decodeURIComponent(). No data is uploaded — safe for encoding URLs that contain tokens, passwords, or personal information.

Benefits

  • Fix Broken URLs with Special Characters: URLs containing spaces, commas, brackets, or Unicode characters often break when passed between systems. Encoding the problematic parts ensures reliable transmission across all HTTP clients and servers.
  • Build API Requests with Complex Query Parameters: When constructing API URLs with query parameters that contain user-supplied values (search terms, filter expressions, dates with time zones), always URL-encode the values before concatenating them into the URL string.
  • Read Log Files and Access Logs: Web server and proxy access logs often contain percent-encoded URL paths. Decode them here to quickly understand what URL was actually requested without manually translating each %XX sequence.
  • Debug Redirect Chains: Redirect URLs (especially OAuth callbacks and SSO return URLs) often contain heavily encoded nested URLs. Decode them step by step to understand what the final destination and parameters are.

Supported Formats & Capabilities

  • Plain text strings (encode to percent-encoded form)
  • Percent-encoded URL strings (decode to plain text)

Common Problems & Solutions

I encoded my full URL and now the slashes and question marks are encoded too.
Use encodeURIComponent for individual query parameter values, not full URLs. It encodes structural characters like /, ?, and & which breaks the URL structure. For a full URL, encode only the query parameter values separately, then concatenate them into the URL.
The decoded URL still has %20 or other percent codes.
Some URLs are double-encoded — the encoded form itself was encoded again. Decode the string once here, then if you still see %XX sequences, decode it a second time.
I'm seeing + signs instead of %20 for spaces.
HTML form submissions use application/x-www-form-urlencoded encoding, which represents spaces as + rather than %20. URL encoding (percent-encoding) uses %20. Both are valid in different contexts — + as a space only works in query string context, not in URL paths.
How do I encode a URL that's already partially encoded?
Decoding first and then re-encoding is the safest approach to avoid double-encoding. If you encode an already-encoded string, the % signs in the existing encoding get encoded again, producing %25XX sequences.

Pro Tips & Best Practices

  • Always encode query parameter values individually, not the full URL. Encoding the full URL encodes the ?, &, and = delimiters, which breaks the query string structure.
  • When building URLs in JavaScript code, prefer the URL and URLSearchParams APIs over manual string concatenation — they handle encoding automatically: `new URLSearchParams({key: value}).toString()`.
  • OAuth callback URLs and SSO redirect parameters often contain a full URL as a query parameter value. That inner URL must be fully encoded before appending it as a value — use this tool to encode just the inner URL, then append it.
  • When copy-pasting URLs from browser address bars, modern browsers auto-encode non-ASCII characters but may display them decoded visually. The actual transmitted URL may differ from what you see.

Privacy & Data Security

URL encoding and decoding run entirely in your web browser using JavaScript's native encodeURIComponent() and decodeURIComponent() functions. No input text is transmitted to any server at any point — the conversion is a pure client-side operation. URLs you encode or decode may contain API keys, access tokens, search terms, personal data, or authentication parameters — all of which stay completely on your device. The tool has no server backend and sends no telemetry about what you encode.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL, preserving structural characters like ?, #, &, /, and : that have semantic meaning. encodeURIComponent encodes individual query parameter values or path segments, converting all characters except letters, digits, and - _ . ~ to percent-encoded form.
When do I need to URL encode a string?
Any time you include user-supplied text or variable data in a URL — especially in query parameters — you should URL-encode it. This prevents broken URLs and potential injection attacks where a user includes & or = in a field value.
Is my data uploaded when I use this URL encoder?
No. Encoding and decoding runs entirely in your browser using native JavaScript functions. Nothing is sent to any server.
What does %20 mean in a URL?
%20 is the percent-encoded representation of a space character (ASCII code 32, hex 0x20). URLs cannot contain raw space characters, so spaces must be represented as %20 in paths and query parameters.
Can I encode a full URL including query parameters?
You can encode a full URL as a string, but this will encode the structural characters (?, &, =) which breaks the URL. Typically you should encode only the query parameter values, then assemble the URL manually.
Why are there different percent-encoding standards?
RFC 3986 defines standard URI encoding using %XX hex sequences. HTML forms use application/x-www-form-urlencoded which uses + for spaces. These are distinct encoding schemes used in different contexts — URL paths use RFC 3986; HTML form submissions traditionally use the form-urlencoded scheme.
How do I decode a URL from a browser's address bar?
Copy the URL from the address bar and paste it into the decode mode of this tool. Modern browsers show the decoded version visually but may copy the encoded form. The decoder reveals the actual transmitted URL string.

Related Developer Utilities

JSON Formatter

Format, minify, validate, and filter JSON with JSONPath. Features an interactive tree view and YAML export.

UUID & Identifier Studio

Generate UUID v4, UUID v7, ULID, NanoID, CUID2 values in bulk with real-time inspector and code export formats.

JSON ↔ CSV

Convert JSON arrays to CSV or parse CSV back to JSON in one click.

JWT Decoder

Decode, verify, edit, and sign JSON Web Tokens (JWT) online with 100% private, local browser processing.