Start a project

Tool 43 of 57 · Encoding

URL Encoder & Parser

Encode or decode text for URLs, take any address apart into protocol, host, path, query and hash, and edit its parameters one by one.

URL Encoder & Parser at a glanceIllustration: 1, An address; 2, processed in your browser; 3, Parts + parameters.URL Encoder & Parser?utm_source=&utm_medium=&utm_campaign=1An address3Parts + parameters2In yourbrowser
1 An address 2 processed on your device 3 Parts + parameters

URL Encoder & Parser

Encode or decode

Take an address apart

Query parameters

Edit, add or remove parameters and the address is rebuilt below.

Rebuilt address
Parts (JSON)

01

What it does

Percent-encodes and decodes text, splits addresses into parts, and lets you edit or strip query parameters.

  • encodeURIComponent, encodeURI and form encoding
  • Decode with clear errors for broken % codes
  • Address split into every part
  • Edit, add and remove query parameters

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

Encoded text, a rebuilt address and JSON, with a Copy and a Download button on every result.

  • URL
  • Encoding
  • Query string

Why it matters

Spaces, ampersands and pound signs in links break them, or quietly change what they mean: an & in a value starts a new parameter. Encoding them correctly is essential for tracking links, API calls and redirects.

Long marketing links are also hard to read. Splitting one into its parts shows exactly what it carries, and removing tracking parameters gives you a clean link to share.

How it works

  1. InputText or a full web address
  2. In your browserEncoded, or split by the browser's URL parser
  3. OutputEncoded text, the parts, editable parameters and JSON

Where it fits in a designer's workflow

  1. Plan
  2. Design
  3. Build
  4. Test
  5. Launch
Building links and debugging tracking parameters.

By the numbers

  1. https:Protocol
  2. shop.example.co.ukHost
  3. 8443Port
  4. /oak/tablesPath
  5. ?colour=natural&size=6+seater&utm_source=newsletterQuery
  6. #reviewsHash
The tool's example address, split by the WHATWG URL parser (the one every browser uses). The hash (#reviews) never reaches the server; the query is where tracking tags like utm_source live. Source: WHATWG URL Standard.
Show the parts as a table
PartValue
Protocolhttps:
Hostshop.example.co.uk
Port8443
Path/oak/tables
Query?colour=natural&size=6+seater&utm_source=newsletter
Hash#reviews

How to use it

  1. Type text in the top box to encode it, or paste encoded text to decode it.
  2. Paste a full address on the right to see its parts.
  3. Edit, add or remove parameters below.
  4. Copy or download the rebuilt address.

FAQ

encodeURI or encodeURIComponent?

Use encodeURIComponent for a single value (a search term or a parameter). encodeURI is for a whole address and leaves / ? & = alone.

Why do spaces become + sometimes?

HTML forms encode spaces as +. In other parts of a URL a space is %20. The form option matches what forms send.

Why can't it decode my text?

A % must be followed by two hex digits. A stray % (like '50% off') isn't valid encoding.

Does it visit the address?

No. It only reads the text you paste.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk