Интерактивная площадка для тестирования use-base64 React-хука и функций кодирования с предпросмотром в реальном времени.
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-base64Простой веб-инструмент для быстрого кодирования и декодирования Base64 без необходимости установки.
Мы работаем над дополнительными инструментами и утилитами Base64. Следите за обновлениями!