Interactive playground for testing use-base64 React hook and encoding functions with real-time preview.
SGVsbG8sIHdvcmxkIQ==
SGVsbG8sIHdvcmxkIQ==
const encoded = useBase64("Hello, world!")
const encoded = encodeBase64("Hello, world!")
import { useState } from "react"
import { useBase64, encodeBase64 } from "use-base64"
export default function Example() {
const [text, setText] = useState("Hello, world!")
const encoded = useBase64(text, { variant: "url", padding: "strip", wrap: false })
// or: const encoded2 = encodeBase64(text, { variant: "standard" })
return (
<div>
<input value={text} onChange={e => setText(e.target.value)} />
<pre>{encoded}</pre>
</div>
)
}npm install use-base64yarn add use-base64pnpm add use-base64bun add use-base64Simple web-based tool for quick Base64 encoding and decoding without any installation required.
We're working on additional Base64 tools and utilities. Stay tuned!