# What to use for URL encoding?

**URL:** <https://discourse.julialang.org/t/what-to-use-for-url-encoding/25467>\
**Category:** New to Julia\
**Created:** [June 20, 2019, 12:03am UTC](https://discourse.julialang.org/t/what-to-use-for-url-encoding/25467 "2019-06-20T00:03:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abeburnett](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abeburnett/32/8974_2.png) [@abeburnett](https://discourse.julialang.org/u/abeburnett)\
**Post date:** [June 20, 2019, 12:03am UTC](https://discourse.julialang.org/t/what-to-use-for-url-encoding/25467/1 "2019-06-20T00:03:34Z")

</div>

Hi there,

I’m looking to correctly encode URLs. I’m coming from Python and R which have packages/libraries I’ve used to accomplish this, but I’m not seeing anything on Google. Can anyone please point me to a URL encoding Julia library?

Thank you!

---

<div class="post-metadata">

**Author:** ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)\
**Post date:** [June 20, 2019, 1:34am UTC](https://discourse.julialang.org/t/what-to-use-for-url-encoding/25467/2 "2019-06-20T01:34:23Z")

</div>

Hello,

You should have a look to the [`print`](https://github.com/JuliaWeb/URIParser.jl/blob/master/src/parser.jl#L302-L326) and [`show(..., ::MIME"text/html", ..)`](https://github.com/JuliaWeb/URIParser.jl/blob/master/src/parser.jl#L328-L334) function in the [uriparser](https://github.com/JuliaWeb/URIParser.jl) package.

---

<div class="post-metadata">

**Author:** ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)\
**Post date:** [June 20, 2019, 5:22am UTC](https://discourse.julialang.org/t/what-to-use-for-url-encoding/25467/3 "2019-06-20T05:22:31Z")

</div>

You can also use the more actively maintained HTTP.jl package, like:

```julia
HTTP. escapeuri(url)
HTTP. unescapeuri(url)

```

---

<div class="post-metadata">

**Author:** ![abeburnett](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abeburnett/32/8974_2.png) [@abeburnett](https://discourse.julialang.org/u/abeburnett)\
**Post date:** [June 20, 2019, 11:06pm UTC](https://discourse.julialang.org/t/what-to-use-for-url-encoding/25467/4 "2019-06-20T23:06:00Z")

</div>

Ah, perfect! I’m already importing the HTTP package, so this’ll be super easy to use. No wonder I didn’t find the appropriate function (when it’s called “escapeuri” lol). Thank you for pointing those functions out!

---

<div class="post-metadata">

**Author:** ![hhaensel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hhaensel/32/1207_2.png) [@hhaensel](https://discourse.julialang.org/u/hhaensel)\
**Post date:** [October 2, 2025, 6:11pm UTC](https://discourse.julialang.org/t/what-to-use-for-url-encoding/25467/5 "2025-10-02T18:11:18Z")

</div>

Just a note that the function nowadays oringinates from the packages `URIs.jl`. So if you don’t need the full HTTP, you can live with a smaller dependency.
