URL encoder, decoder and parser

Query parameters

IDN / Punycode


    

Examples

Input

hello world & café

Encoded

hello%20world%20%26%20caf%C3%A9

URL Guides & articles

Related tools

URL decoder and URL encoder online is often used together with HTML decode and HTML encode online, Regex tester: test a regular expression online, Base64 decoder and Base64 encoder online when payloads, tokens, URLs, logs, or markup move through the same workflow.

URL encoder, decoder and parser

Decode URLs, encode values, and inspect URL parts and query params. DevToolGrid Online offers a free URL decoder and URL encoder online.

What is URL encoding?

URL encoding (percent-encoding) replaces characters that are unsafe or reserved in a URL with a % followed by their hexadecimal code. For example a space becomes %20 and & becomes %26. It lets you put arbitrary text — spaces, Unicode, symbols — into query strings and paths without breaking the address.

How to encode or decode a URL

  1. 1 Paste a URL or value into the input panel.
  2. 2 Click Encode component for query values, or Encode URI to keep the structure.
  3. 3 Use Decode to turn percent-escapes back into readable text.
  4. 4 Parse a full URL to inspect the scheme, host, path, query and hash.

Common URL encoding mistakes

  • Spaces as + vs %20In query strings a space may appear as + (form encoding) or %20. Mixing them up can corrupt values.
  • Not encoding reserved charactersCharacters like &, =, ? and # have special meaning. Leaving them unencoded in a value breaks the query.
  • Double encodingEncoding an already-encoded string turns %20 into %2520. Encode each value exactly once.

URL encode and decode in code

URL encode JavaScript

encodeURIComponent(value)

URL decoder JS

decodeURIComponent(value)

URL encode Python

urllib.parse.quote(value, safe="")

URL encode C#

Uri.EscapeDataString(value)

URL encoder Java

URLEncoder.encode(value, StandardCharsets.UTF_8)

URL encode bash

jq -rn --arg v "$v" '$v|@uri'

URL decode command line

python3 -c "import sys,urllib.parse as u;print(u.unquote(sys.argv[1]))" "$v"

URL encode PHP

rawurlencode($value)

encodeURIComponent vs encodeURI

encodeURIComponent encodes almost everything, including & = ? /, so it is correct for a single query value or path segment. encodeURI keeps the characters that form a valid URL (such as : / ? &) and is meant for encoding a whole address. Use the component version for parameters and the full version for complete URLs.

FAQ

Is this tool free?

Yes. The URL encoder, decoder and parser are completely free with no limits.

Is this a URL encoder decoder in one page?

Yes. It is a URL decoder encoder pair in a single panel, so URL encode and decode both happen here. URL encode online, URL decode online, no install.

What does the URL encode converter change?

It percent-encodes URL encoded characters that would otherwise break an address, and the URL encoding decoder reverses them. The percent encoding converter covers both directions.

Is my data sent to a server?

No. Encoding, decoding and parsing run locally in your browser; nothing is uploaded.

What is the difference between + and %20?

Both can mean a space in a query string. %20 always means a space; + means a space only in application/x-www-form-urlencoded data.

Can it parse query parameters?

Yes. It breaks a URL into its parts and lets you edit, sort and de-duplicate query parameters.