πŸ”—
πŸ”Œ

Encode URL Parameters for APIs

Safely encode query string parameters before appending them to API request URLs.

Nid oes angen mewngofnodi

API tips

πŸ”Œ

Query parameters containing spaces, ampersands (&), or equals signs (=) must be percent-encoded before being added to a URL.

πŸ’‘

Use encodeURIComponent for individual parameter values, not encodeURI β€” encodeURI leaves characters like & and = unencoded.

πŸ›‘οΈ

Never append user input directly to a URL without encoding it. Unencoded input can break your URL or create injection vulnerabilities.

πŸ“‹

After encoding, paste the result into your API client (Postman, curl) or directly into your code as a string constant.

Sut Mae'n Gweithio

1
Ewch i mewn
Enter your data into the tool above. Everything stays local to your browser.
2
Proses
The tool processes your data instantly in your browser using JavaScript. No server, no waiting.
3
Lawrlwythwch
Get your result instantly. Nothing is stored after you leave the page β€” complete privacy.

Pam defnyddio ein un ni?

βœ“Hollol rhad ac am ddim - dim costau cudd, byth
βœ“Nid oes angen cyfrif, e-bost na mewngofnodi
βœ“Nid yw ffeiliau byth yn gadael eich dyfais
βœ“Dim cyfyngiadau maint ffeil o gwbl
βœ“Dim dyfrnodau ar unrhyw allbwn

Also check out…

Cwestiynau Cyffredin