That is not UTF-8, that is percent encoding also known as url encoding.
You can use decodeURIComponent() to convert it back before displaying it
$("#quote1 span").html(decodeURIComponent(text1));
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › decodeURI
decodeURI() - JavaScript | MDN
July 8, 2025 - The decodeURI() function decodes the URI by treating each escape sequence in the form %XX as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character.
Eric Meyer
meyerweb.com › eric › tools › dencoder
URL Decoder/Encoder
The URL Decoder/Encoder is licensed under a Creative Commons Attribution-ShareAlike 2.0 License.
00:53
️ EncodeURI & DecodeURI in JavaScript
01:54
How to decode url query string value to get the actual value using ...
02:03
How to Encode a URL in JavaScript (encodeURI vs encodeURIComponent) ...
15:31
What is URL Encoding? - URL Encode/Decode Explained - Web Development ...
"Reveal the Secret Behind React.js URLs: Uncover the Power ...
How do you decode or encode a URL in JavaScript? How do ...
Top answer 1 of 2
77
That is not UTF-8, that is percent encoding also known as url encoding.
You can use decodeURIComponent() to convert it back before displaying it
$("#quote1 span").html(decodeURIComponent(text1));
2 of 2
26
Use either of the following built in JavaScript function to decode any encoded text. No need for jquery or any other library.
const text1 = "Unser platonisches Internetreich droht in die H%E4nde einer bewaffneten Miliz zu fallen."
console.log(decodeURI(text1))
console.log(decodeURIComponent(text1))
update: In case you're wondering how to encode, decoded text, you can use another built in JavaScript function like so
console.log(encodeURI(text1))
console.log(encodeURIComponent(text1))
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › decodeURIComponent
decodeURIComponent() - JavaScript | MDN
decodeURIComponent("JavaScript_шеллы"); // "JavaScript_шеллы" js · try { const a = decodeURIComponent("�%A"); } catch (e) { console.error(e); } // URIError: malformed URI sequence · decodeURIComponent() cannot be used directly to parse query parameters from a URL.
URL Decode
urldecoder.org
URL Decode and Encode - Online
Live mode: When you turn on this option the entered data is decoded immediately with your browser's built-in JavaScript functions, without sending any information to our servers.
W3Schools
w3schools.com › Jsref › jsref_decodeuricomponent.asp
JavaScript decodeURIComponent() Method
❮ Previous JavaScript Global ... let decoded = decodeURIComponent(encoded); Try it Yourself » · The decodeURIComponent() method decodes a URI component....
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › encodeURI
encodeURI() - JavaScript | MDN
July 8, 2025 - The following function encodes a string for RFC3986-compliant URL format. js · function encodeRFC3986URI(str) { return encodeURI(str) .replace(/[/g, "[") .replace(/]/g, "]") .replace( /[!'()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, ); } decodeURI() encodeURIComponent() decodeURIComponent() Was this page helpful to you?
Medium
ashishdev48.medium.com › encode-and-decode-uri-in-javascript-a-complete-guide-976f4986f6cf
Encode and Decode URI in JavaScript: A Complete Guide | by Ashishkumarjena | Medium
June 17, 2026 - JavaScript provides three primary methods for encoding and decoding URIs: ... Let’s break down each of these functions, their use cases, and examples. The encodeURI() function is used to encode an entire URI. It’s ideal when you want to encode a full URL but want to preserve certain characters that have special meanings in URLs (such as ?, &, #, =).
W3Schools
w3schools.com › jsref › jsref_decodeuri.asp
JavaScript decodeURI() Method
❮ Previous JavaScript Global ... = encodeURI(uri); let decoded = decodeURI(encoded); Try it Yourself » · The decodeURI() method decodes a URI....
GitHub
gist.github.com › 6565497
From http://www.webtoolkit.info/javascript-url-decode- ...
From http://www.webtoolkit.info/javascript-url-decode-encode.html · Raw · url.js · This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
DigitalOcean
digitalocean.com › community › tutorials › how-to-encode-and-decode-strings-with-base64-in-javascript
How To Encode and Decode Strings with Base64 in JavaScript | DigitalOcean
October 2, 2025 - In this tutorial, we covered the use of btoa() and atob() for Base64 encoding and decoding in JavaScript.
Board Infinity
boardinfinity.com › blog › encoding-and-decoding-url-in-javascript-how
URI Encoding and Decoding in Web Development Explained
August 30, 2025 - In the URL string, where the server will decode it, the query parameters must likewise be encoded. Numerous browsers automatically encrypt and decrypt the response string and URL. E.g., A space " " is encoded as a + or . The method from JavaScript below can be used to convert the special characters.
Instagram
instagram.com › popular › js-url-decode
Js Url Decode
We cannot provide a description for this page right now
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › URL
URL - Web APIs | MDN
June 2, 2026 - The URL interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL.