-1
Hi, Adolfo!
How are you doing this JS conversion? Something like this? This below shows in the console 3 results for the text "Hello World!": original, Base64 and Decoded.
const str = "Olá mundo!";
const base64 = btoa(str);
const decode = atob(base64);
console.log("Original: " + str);
console.log("Base64: " + base64);
console.log("Decodificada: " + decode);
<!doctype html>
<html lang="pt_br">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Olá mundo!</title>
</head>
<body>
<h1>Olá mundo!</h1>
</body>
</html>
If you send this Base64 to PHP the result changes? Kind of:
<?php
$str = 'tua base64 string aqui';
echo base64_decode(urldecode($str));
?>