Tiny Online Tools logoTiny Online Toolssearch搜索工具…grid_view全部工具
首页chevron_right安全工具chevron_right随机 Hex 生成器随机 Hex 生成器

随机 Hex 生成器

在浏览器中即时生成随机十六进制字符串和颜色代码。

相似工具

随机 IP 生成器

随机 IP 生成器

为测试和开发生成随机 IPv4 和 IPv6 地址,并可选择公网或私网范围。

用户名生成器

用户名生成器

为账号和测试生成多种风格的随机用户名。

安全令牌生成器

安全令牌生成器

使用 Web Crypto API 生成十六进制、base64 或 base64url 格式的加密安全令牌。

图片取色器

图片取色器

从任意图片中提取颜色代码。

JSON 密钥提取器

JSON 密钥提取器

选择要在 JSON 对象数组中包含或排除的键。

JPG 转 PDF

JPG 转 PDF

将 JPG 图片转换为单个 PDF 文档。

Markdown 到 HTML

Markdown 到 HTML

转换 Markdown 到 HTML instantly 使用 live preview.

apps

更多工具

浏览我们完整的免费在线工具集合。

Random Hex Generator

Hexadecimal strings appear everywhere in computing—color codes in CSS (#FF5733), database IDs, cryptographic hashes, and random tokens. This tool 生成s random hex strings of any length, with optional 格式化ting for CSS color codes, making it useful for everything from design prototyping to security token generation.

Hex for colors

The most common use case for random hex is generating random colors. CSS color codes are 6-character hex strings prefixed with # (like #2E8B57). This tool lets you 生成 valid CSS color codes with a single click, complete with live color previews. Perfect for testing color palettes, generating test data with varied colors, or creating random design mockups.

Custom length flexibility

While 6-character hex is standard for colors, you might need other lengths. 4-character hex for short identifiers (16^4 = 65,536 possible values), 8-character for more entropy, 32-character for tokens and session IDs, 64-character for cryptographic applications. The tool supports custom lengths from 1 to 256 characters, covering any use case.

Batch generation

生成 up to 100 random hex strings in a single operation, perfect for populating test data, creating fixture lists, or generating multiple color palettes. Copy all results at once and paste into your code or design tool.

格式化ting options

Toggle between lowercase (a-f) and uppercase (A-F) hex output based on your requirements. Add a # prefix to 生成 valid CSS color codes. The tool shows live previews for 6-character hex strings, letting you see the colors before copying them.

Non-cryptographic randomness

While the tool uses the Web Crypto API for generation, for color and non-security purposes, the randomness quality is more than sufficient. For security-sensitive applications like tokens, use the Secure Token Generator instead, which offers more control over entropy and 格式化 options.