# Peasy Gen — Full Catalog > Generator tools made easy. Peasy Gen provides free browser-based tools at https://peasygen.com/. All processing happens client-side — files never leave your device. ## Tools (15) ### Fake Data Generator Generate realistic placeholder personal data — names, emails, phone numbers, addresses, companies, and job titles. Output as plain text, JSON, or CSV. - URL: https://peasygen.com/gen/gen-fake-data/ - Category: Generator Tools - Processing: client ### Mock JSON Generator Generate mock JSON data with realistic schemas — users, products, blog posts, events, and orders. Perfect for API prototyping and frontend development. - URL: https://peasygen.com/gen/gen-mock-json/ - Category: Generator Tools - Processing: client ### Username Generator Generate creative usernames in 8 styles — CamelCase, underscore, dot notation, leet speak, all caps, verb combos, and more. - URL: https://peasygen.com/gen/gen-username/ - Category: Generator Tools - Processing: client ### Color Palette Generator Generate harmonious 5-color palettes using color theory — complementary, analogous, triadic, monochromatic, pastel, and earth tones. Includes CSS and Tailwind output. - URL: https://peasygen.com/gen/gen-color-palette/ - Category: Generator Tools - Processing: client ### Lorem Markup Generator Generate Lorem Ipsum with HTML or Markdown formatting — headings, paragraphs, lists, blockquotes, bold, italic, and code spans. - URL: https://peasygen.com/gen/gen-lorem-markup/ - Category: Generator Tools - Processing: client ### Random Number Generator Generate random numbers, roll dice, flip coins, draw lottery numbers, or shuffle lists. Uses crypto.getRandomValues() for true randomness. - URL: https://peasygen.com/gen/gen-number/ - Category: Generator Tools - Processing: client ### CSV Data Generator Generate random CSV data with configurable columns — names, emails, phone numbers, dates, companies, cities, amounts, and more. Export with custom delimiters. - URL: https://peasygen.com/gen/gen-csv-data/ - Category: Generator Tools - Processing: client ### Random Date Generator Generate random dates within a configurable range. Output in 6 formats: ISO, US, EU, long text, Unix timestamp, or relative time. - URL: https://peasygen.com/gen/gen-random-dates/ - Category: Generator Tools - Processing: client ### Email Address Generator Generate random email addresses in multiple styles — professional, simple, nickname, and corporate. Choose domain targeting for realistic test data. - URL: https://peasygen.com/gen/gen-email-addresses/ - Category: Generator Tools - Processing: client ### Avatar Generator Generate initial-based SVG avatars from names. Choose shapes (circle, square, rounded), background styles (solid, gradient, pastel, dark, brand), and colors. - URL: https://peasygen.com/gen/gen-avatar-svg/ - Category: Generator Tools - Processing: client ### Cron Expression Builder Build and parse cron schedule expressions Bidirectional cron tool: parse expressions to human-readable text, or describe a schedule in plain English to generate the cron syntax. Shows next 5 run times. - URL: https://peasygen.com/gen/gen-cron-expression/ - Category: Generator Tools - Processing: client - Steps: 1. 1 2. . 3. 4. E 5. n 6. t 7. e 8. r 9. 10. a 11. 12. c 13. r 14. o 15. n 16. 17. e 18. x 19. p 20. r 21. e 22. s 23. s 24. i 25. o 26. n 27. 28. ( 29. e 30. . 31. g 32. . 33. , 34. 35. ' 36. 0 37. 38. * 39. / 40. 2 41. 42. * 43. 44. * 45. 46. * 47. ' 48. ) 49. 50. t 51. o 52. 53. p 54. a 55. r 56. s 57. e 58. 59. i 60. t 61. 62. 2 63. . 64. 65. O 66. r 67. 68. d 69. e 70. s 71. c 72. r 73. i 74. b 75. e 76. 77. a 78. 79. s 80. c 81. h 82. e 83. d 84. u 85. l 86. e 87. 88. ( 89. e 90. . 91. g 92. . 93. , 94. 95. ' 96. e 97. v 98. e 99. r 100. y 101. 102. w 103. e 104. e 105. k 106. d 107. a 108. y 109. 110. a 111. t 112. 113. 9 114. a 115. m 116. ' 117. ) 118. 119. 3 120. . 121. 122. V 123. i 124. e 125. w 126. 127. h 128. u 129. m 130. a 131. n 132. - 133. r 134. e 135. a 136. d 137. a 138. b 139. l 140. e 141. 142. e 143. x 144. p 145. l 146. a 147. n 148. a 149. t 150. i 151. o 152. n 153. 154. a 155. n 156. d 157. 158. n 159. e 160. x 161. t 162. 163. r 164. u 165. n 166. 167. t 168. i 169. m 170. e 171. s 172. 173. 4 174. . 175. 176. C 177. o 178. p 179. y 180. 181. t 182. h 183. e 184. 185. c 186. r 187. o 188. n 189. 190. e 191. x 192. p 193. r 194. e 195. s 196. s 197. i 198. o 199. n ### API Key Generator Generate secure API keys and tokens in various formats Generate cryptographically random API keys in multiple formats: hex, base62, UUID-based with prefix, bearer tokens, and AWS-style access keys. Shows entropy bits per format. - URL: https://peasygen.com/gen/gen-api-key/ - Category: Generator Tools - Processing: client - Steps: 1. 1 2. . 3. 4. S 5. e 6. l 7. e 8. c 9. t 10. 11. a 12. 13. k 14. e 15. y 16. 17. f 18. o 19. r 20. m 21. a 22. t 23. 24. ( 25. h 26. e 27. x 28. , 29. 30. b 31. a 32. s 33. e 34. 6 35. 2 36. , 37. 38. U 39. U 40. I 41. D 42. , 43. 44. b 45. e 46. a 47. r 48. e 49. r 50. , 51. 52. A 53. W 54. S 55. - 56. s 57. t 58. y 59. l 60. e 61. ) 62. 63. 2 64. . 65. 66. O 67. p 68. t 69. i 70. o 71. n 72. a 73. l 74. l 75. y 76. 77. a 78. d 79. d 80. 81. a 82. 83. p 84. r 85. e 86. f 87. i 88. x 89. 90. ( 91. e 92. . 93. g 94. . 95. , 96. 97. p 98. k 99. _ 100. t 101. e 102. s 103. t 104. _ 105. ) 106. 107. 3 108. . 109. 110. S 111. e 112. t 113. 114. c 115. o 116. u 117. n 118. t 119. 120. t 121. o 122. 123. g 124. e 125. n 126. e 127. r 128. a 129. t 130. e 131. 132. m 133. u 134. l 135. t 136. i 137. p 138. l 139. e 140. 141. k 142. e 143. y 144. s 145. 146. 4 147. . 148. 149. C 150. o 151. p 152. y 153. 154. k 155. e 156. y 157. s 158. 159. — 160. 161. g 162. e 163. n 164. e 165. r 166. a 167. t 168. e 169. d 170. 171. s 172. e 173. c 174. u 175. r 176. e 177. l 178. y 179. 180. w 181. i 182. t 183. h 184. 185. c 186. r 187. y 188. p 189. t 190. o 191. . 192. g 193. e 194. t 195. R 196. a 197. n 198. d 199. o 200. m 201. V 202. a 203. l 204. u 205. e 206. s 207. ( 208. ) ### Short ID Generator Generate nanoid-style short unique identifiers Generate compact, URL-safe unique IDs like nanoid. Configurable length, alphabet, and collision probability estimation. Supports URL-safe, hex, alphanumeric, and no-ambiguous character sets. - URL: https://peasygen.com/gen/gen-short-id/ - Category: Generator Tools - Processing: client - Steps: 1. 1 2. . 3. 4. S 5. e 6. t 7. 8. I 9. D 10. 11. l 12. e 13. n 14. g 15. t 16. h 17. 18. ( 19. d 20. e 21. f 22. a 23. u 24. l 25. t 26. 27. 2 28. 1 29. 30. c 31. h 32. a 33. r 34. a 35. c 36. t 37. e 38. r 39. s 40. ) 41. 42. 2 43. . 44. 45. C 46. h 47. o 48. o 49. s 50. e 51. 52. a 53. n 54. 55. a 56. l 57. p 58. h 59. a 60. b 61. e 62. t 63. 64. p 65. r 66. e 67. s 68. e 69. t 70. 71. o 72. r 73. 74. c 75. u 76. s 77. t 78. o 79. m 80. 81. c 82. h 83. a 84. r 85. a 86. c 87. t 88. e 89. r 90. s 91. 92. 3 93. . 94. 95. G 96. e 97. n 98. e 99. r 100. a 101. t 102. e 103. 104. o 105. n 106. e 107. 108. o 109. r 110. 111. m 112. a 113. n 114. y 115. 116. I 117. D 118. s 119. 120. ( 121. u 122. p 123. 124. t 125. o 126. 127. 5 128. 0 129. ) 130. 131. 4 132. . 133. 134. R 135. e 136. v 137. i 138. e 139. w 140. 141. c 142. o 143. l 144. l 145. i 146. s 147. i 148. o 149. n 150. 151. p 152. r 153. o 154. b 155. a 156. b 157. i 158. l 159. i 160. t 161. y 162. 163. a 164. n 165. d 166. 167. e 168. n 169. t 170. r 171. o 172. p 173. y ### Regex Tester Test regular expressions with real-time matching Test regular expressions against input text with real-time match highlighting. View capture groups, named groups, and match positions. Common pattern library included. - URL: https://peasygen.com/gen/regex-tester/ - Category: Generator Tools - Processing: client - Steps: 1. Enter a regex pattern in the Pattern field 2. Set flags (g for global, i for case-insensitive, m for multiline) 3. Choose an action: Match, Match All, Replace, or Split 4. Enter test text in the input area 5. Click Test to see results ### URL Slug Generator Generate clean, SEO-friendly URL slugs from any text. Transliteration for accented characters, multiple output formats (kebab, snake, camelCase), and URL previews. - URL: https://peasygen.com/gen/url-slug-generator/ - Category: Generator Tools - Processing: client ## Guides (25) ### How to Generate Strong Random Passwords Password generation requires cryptographic randomness and careful character selection. This guide covers the principles behind strong password generation, entropy calculation, and common generation mistakes to avoid. - URL: https://peasygen.com/guides/generate-strong-random-passwords/ - Category: How-To - Reading time: 1 min - Words: 224 Key takeaways: - Password strength is measured in entropy — the number of bits of randomness. - Entropy = log2(character_set_size ^ password_length) - Never use `Math.random()` or similar pseudo-random functions for password generation. - Random word passphrases (like "correct horse battery staple") offer high entropy while being memorizable. - Using common substitutions (p@ssw0rd) — these are in every cracking dictionary. ## What Makes a Password Strong? Password strength is measured in entropy — the number of bits of randomness. Higher entropy means more possible combinations, making brute-force attacks impractical. ## Entropy Calculation Entropy = log2(character_set_size ^ password_length) | Character Set | Pool Size | 12-char Entropy | 16-char Entropy | |--------------|-----------|-----------------|----------------| | Lowercase only | 26 | 56 bits | 75 bits | | Mixed case | 52 | 68 bits | 91 bits | | Mixed + digits | 62 | 71 bits | 95 bits | | Mixed + digits + symbols | 95 | 79 bits | 105 bits | A password with 80+ bits of entropy is considered strong for most purposes. ## Cryptographic Randomness Never use `Math.random()` or similar pseudo-random functions for password generation. These are predictable. Use cryptographically secure random number generators (CSPRNG): - JavaScript: `crypto.getRandomValues()` - Python: `secrets` module - Node.js: `crypto.randomBytes()` ## Passphrase Alternative Random word passphrases (like "correct horse battery staple") offer high entropy while being memorizable. A 4-word passphrase from a 7776-word list (Diceware) provides 51 bits of entropy; 6 words provides 77 bits. ## Common Mistakes - Using common substitutions (p@ssw0rd) — these are in every cracking dictionary. - Truncating generated passwords to meet site limits (reduces entropy). - Generating passwords that don't meet the site's character requirements. - Using non-cryptographic random sources. ### Lorem Ipsum and Placeholder Text: When and How to Use It Placeholder text fills layouts during design before real content arrives. This guide covers the history of Lorem Ipsum, when to use it, and better alternatives for different contexts. - URL: https://peasygen.com/guides/lorem-ipsum-placeholder-text-guide/ - Category: How-To - Reading time: 1 min - Words: 295 Key takeaways: - Lorem Ipsum is scrambled Latin derived from Cicero's 'De Finibus Bonorum et Malorum' (45 BC). - For a medical site, use placeholder text about health topics. - Paragraph count**: Generate 1-50 paragraphs - Many designers now advocate for content-first design, where real content shapes the design rather than the other way around. ## What Is Lorem Ipsum Lorem Ipsum is scrambled Latin derived from Cicero's 'De Finibus Bonorum et Malorum' (45 BC). It has been the printing industry's standard placeholder text since the 1500s. Its letter distribution roughly mimics English, making layouts look realistic. ## When to Use Placeholder Text | Scenario | Use Placeholder? | Why | |----------|-----------------|-----| | Wireframing | Yes | Focus on structure, not content | | Client presentations | Sometimes | Real content is better if available | | Development testing | Yes | Need text to test layouts | | Production deployment | Never | Replace before launch | ## Alternatives to Lorem Ipsum ### Topic-Relevant Placeholder For a medical site, use placeholder text about health topics. For a legal site, use legal-sounding text. This helps stakeholders visualize the final product more accurately. ### Real Draft Content The best placeholder is actual draft content. Even rough drafts reveal layout issues that Lorem Ipsum hides — overly long titles, insufficient paragraph variety, and missing images. ### Different Languages If your site supports multiple languages, test layouts with text in each target language. German words are 30% longer than English on average; Chinese characters are much more compact. These differences affect layouts significantly. ## Generator Features to Look For - **Paragraph count**: Generate 1-50 paragraphs - **Word count**: Fixed or variable-length output - **HTML output**: Wrapped in `<p>` tags for direct paste into HTML - **Lists and headings**: Generate structured content, not just paragraphs - **Character set**: Support for different scripts and languages ## The 'Content-First' Movement Many designers now advocate for content-first design, where real content shapes the design rather than the other way around. When real content is available early in the process, layouts naturally accommodate actual content lengths and structures. ### UUID and GUID Generation: Formats, Versions, and Use Cases UUIDs provide unique identifiers across distributed systems without a central authority. Understanding the different versions helps you choose the right one for your use case. - URL: https://peasygen.com/guides/uuid-guid-generation-explained/ - Category: Comparison - Reading time: 2 min - Words: 314 Key takeaways: - A Universally Unique Identifier (UUID) is a 128-bit value formatted as 32 hexadecimal digits with hyphens: `550e8400-e29b-41d4-a716-446655440000`. - UUIDv4 is generated from random or pseudo-random numbers. - UUIDv7 (defined in RFC 9562, 2024) embeds a Unix-millisecond timestamp in the first 48 bits, followed by random data. - Use UUIDv7 for new database primary keys ## What Is a UUID A Universally Unique Identifier (UUID) is a 128-bit value formatted as 32 hexadecimal digits with hyphens: `550e8400-e29b-41d4-a716-446655440000`. The probability of two randomly generated UUIDs colliding is approximately 1 in 2¹²² — effectively zero. ## UUID Versions | Version | Method | Use Case | |---------|--------|----------| | v1 | Timestamp + MAC address | Unique across time and space | | v3 | MD5 hash of name + namespace | Deterministic from input | | v4 | Random | General-purpose (most common) | | v5 | SHA-1 hash of name + namespace | Deterministic (more secure than v3) | | v7 | Timestamp + random (RFC 9562) | Sortable, database-friendly | ## UUIDv4: The Default Choice UUIDv4 is generated from random or pseudo-random numbers. It is the most widely used version because it requires no external input and is simple to implement. Every major language has a built-in UUIDv4 generator. ## UUIDv7: The Modern Alternative UUIDv7 (defined in RFC 9562, 2024) embeds a Unix-millisecond timestamp in the first 48 bits, followed by random data. This makes UUIDv7 naturally sortable by creation time — a significant advantage for database primary keys where B-tree indexes benefit from sequential inserts. ## UUID vs Auto-Increment ID | Aspect | UUID | Auto-Increment | |--------|------|---------------| | Uniqueness scope | Global | Per-table | | Predictability | Not guessable | Sequential, guessable | | Size | 16 bytes | 4-8 bytes | | Index performance | Worse (random v4) / Good (v7) | Best (sequential) | | Distributed generation | No coordination needed | Requires central authority | ## Practical Tips - Use UUIDv7 for new database primary keys - Use UUIDv4 for tokens, session IDs, and API keys - Use UUIDv5 when you need deterministic IDs from known inputs (e.g., hashing … ### UUID vs ULID vs Snowflake ID: Choosing an ID Format Choosing the right unique identifier format affects database performance, sorting behavior, and system architecture. This comparison covers UUID, ULID, Snowflake ID, and NanoID for different application requirements. - URL: https://peasygen.com/guides/uuid-vs-ulid-vs-snowflake/ - Category: Comparison - Reading time: 1 min - Words: 207 Key takeaways: - The choice of ID format affects database index performance, sort order, collision probability, and information leakage. - Format: `550e8400-e29b-41d4-a716-446655440000` - Newer UUID version that encodes a Unix timestamp in the first 48 bits. - 128-bit identifiers that are time-ordered and represented in Crockford Base32. - 64-bit integers encoding timestamp, machine ID, and sequence number. ## Why ID Format Matters The choice of ID format affects database index performance, sort order, collision probability, and information leakage. Random UUIDs can fragment B-tree indexes, while sequential IDs can reveal business metrics. ## UUID v4: Random Universal 128-bit random identifiers. The most widely used unique ID format. **Format:** `550e8400-e29b-41d4-a716-446655440000` **Pros:** Universal support, virtually zero collision risk. **Cons:** Not sortable by time, poor B-tree locality. ## UUID v7: Time-Ordered Newer UUID version that encodes a Unix timestamp in the first 48 bits. **Pros:** Chronologically sortable, good B-tree performance, UUID-compatible. **Cons:** New standard, limited library support. ## ULID: Universally Unique Lexicographically Sortable 128-bit identifiers that are time-ordered and represented in Crockford Base32. **Format:** `01ARZ3NDEKTSV4RRFFQ69G5FAV` **Pros:** Sortable, compact, no special characters. **Cons:** Less standardized than UUID. ## Snowflake ID (Twitter) 64-bit integers encoding timestamp, machine ID, and sequence number. **Pros:** Compact (fits in a 64-bit integer), sortable, high throughput. **Cons:** Requires coordination (machine ID assignment), reveals creation time. ## Decision Guide | Requirement | Recommended | |------------|-------------| | Maximum compatibility | UUID v4 | | Database performance | UUID v7 or ULID | | Compact storage | Snowflake ID (64-bit) | | URL-friendly | NanoID or ULID | | No time leakage | UUID v4 or NanoID | ### Lorem Ipsum Alternatives: Realistic Placeholder Content Lorem Ipsum has been the standard placeholder text since the 1500s, but realistic placeholder content produces better design feedback. This guide covers alternatives and best practices for prototype content. - URL: https://peasygen.com/guides/lorem-ipsum-alternatives/ - Category: Best Practice - Reading time: 1 min - Words: 230 Key takeaways: - Lorem Ipsum looks like real text but conveys no meaning. - Real headlines range from 3 to 15 words. - Use text that matches your content domain: ## The Problem with Lorem Ipsum Lorem Ipsum looks like real text but conveys no meaning. This creates a dangerous illusion — designs that look great with placeholder text may fail with real content of different lengths, languages, or complexity. ## Why Realistic Content Matters ### Length Variations Real headlines range from 3 to 15 words. Real names range from "Li" to "Wolfeschlegelsteinhausenbergerdorff." Lorem Ipsum doesn't expose these edge cases. ### Content Hierarchy Real content has meaning that affects visual hierarchy. A product description with technical specs reads differently than a lifestyle blog post. Testing with realistic content reveals hierarchy problems early. ## Alternatives to Lorem Ipsum ### Domain-Specific Placeholder Text Use text that matches your content domain: - Legal: Sample terms and conditions. - Medical: Anonymized patient summaries. - E-commerce: Realistic product descriptions. - News: Public domain articles. ### Random Data Generators Generate realistic fake data for prototyping: - Names, addresses, phone numbers. - Email addresses and usernames. - Dates, currencies, quantities. ## Best Practices 1. **Use real content early**: Get actual content into designs as soon as possible. 2. **Test extremes**: Include very short and very long content in your tests. 3. **Include numbers**: Mix text with numbers, dates, and special characters. 4. **Consider i18n**: Test with languages that use different scripts, RTL text, and CJK characters. 5. **Mark placeholders clearly**: Ensure nobody ships Lorem Ipsum to production. ### Troubleshooting Random Number Generation Issues Incorrect random number generation causes security vulnerabilities, biased results, and non-reproducible tests. This guide covers common RNG pitfalls and how to verify your random numbers are truly random. - URL: https://peasygen.com/guides/troubleshooting-random-number-generation/ - Category: Troubleshooting - Reading time: 1 min - Words: 228 Key takeaways: - Understanding the difference between PRNG and CSPRNG is critical for choosing the right tool for each use case. - Using `random() % n` to generate numbers in a range introduces bias when the random source's range isn't evenly divisible by n. - Histogram test**: Generate many numbers and verify uniform distribution. - ## Types of Random Number Generators Understanding the difference between PRNG and CSPRNG is critical for choosing the right tool for each use case. ## Types of Random Number Generators Understanding the difference between PRNG and CSPRNG is critical for choosing the right tool for each use case. ### PRNG (Pseudo-Random Number Generator) Deterministic algorithms that produce sequences that appear random. Given the same seed, they produce the same sequence. Examples: Mersenne Twister, xoshiro256. ### CSPRNG (Cryptographically Secure PRNG) PRNGs that are safe for security applications. Their output is indistinguishable from true randomness. Examples: /dev/urandom, crypto.getRandomValues(). ## Common Issues ### Modulo Bias Using `random() % n` to generate numbers in a range introduces bias when the random source's range isn't evenly divisible by n. For example, `random_byte() % 100` slightly favors values 0-55. **Fix:** Use rejection sampling — discard values that would cause bias. ### Seed Predictability Seeding a PRNG with the current timestamp makes the output predictable to anyone who knows approximately when the generator was initialized. **Fix:** Use OS-provided entropy sources for seeds, or use CSPRNGs. ### Insufficient Entropy Systems with low entropy (embedded devices, early boot) may produce predictable random numbers. **Fix:** Wait for entropy pool to fill, use hardware RNG if available. ## Testing Randomness - **Histogram test**: Generate many numbers and verify uniform distribution. - **Chi-squared test**: Statistical test for deviation from expected distribution. - **Sequence correlation**: Check that consecutive values aren't correlated. - **Bit pattern analysis**: Verify all bit positions have approximately equal 0s and 1s. ### How to Generate Lorem Ipsum Text Generate placeholder text for design mockups, wireframes, and prototypes using various Lorem Ipsum styles. - URL: https://peasygen.com/guides/how-to-generate-lorem-ipsum/ - Category: How-To - Reading time: 1 min - Words: 199 ## Generating Lorem Ipsum Text Lorem Ipsum has been the industry's standard dummy text since the 1500s. Modern generators offer far more than the classic Latin passage, providing options for different languages, themed text, and structured content blocks. ### Choosing the Right Style Classic Lorem Ipsum works well for formal design presentations where you want text that clearly reads as placeholder. For more natural-looking mockups, consider generators that produce text matching the cadence and word length of your target language. Some generators also offer "hipster ipsum" or "bacon ipsum" variants that add levity to internal reviews. ### Controlling Output Most generators let you specify paragraph count, sentence count, or word count. For responsive design testing, generate text blocks of varying lengths — short (50 words), medium (150 words), and long (400+ words) — to see how your layout handles different content volumes. This reveals overflow issues, truncation problems, and spacing inconsistencies. ### Best Practices Always replace placeholder text before publishing. Use a lint step or CI check that flags common Lorem Ipsum strings. For accessibility testing, use real content samples rather than placeholder text, since screen readers will attempt to read Lorem Ipsum aloud, producing confusing results for testers. ### UUID vs CUID vs NanoID: Choosing an ID Generator Compare UUID, CUID, NanoID and other ID generation strategies for databases, APIs, and distributed systems. - URL: https://peasygen.com/guides/uuid-vs-cuid-vs-nanoid/ - Category: Comparison - Reading time: 1 min - Words: 234 ## Comparing ID Generation Strategies Choosing the right ID format affects database performance, URL readability, and system scalability. Each approach makes different trade-offs between uniqueness guarantees, sortability, and string length. ### UUID v4 UUID v4 generates 128-bit random identifiers formatted as 36-character strings (e.g., `550e8400-e29b-41d4-a716-446655440000`). They're universally supported and virtually guaranteed unique, but they're long, not sortable by creation time, and can cause B-tree index fragmentation in databases due to random ordering. ### UUID v7 and ULID UUID v7 (RFC 9562) and ULID both embed a timestamp prefix, making them naturally sortable by creation time. This dramatically improves database insert performance since new records always append to the end of B-tree indexes. ULID uses Crockford Base32 encoding, producing 26-character strings that are URL-safe and case-insensitive. ### NanoID and CUID2 NanoID generates compact 21-character IDs using a customizable alphabet. CUID2 produces collision-resistant IDs optimized for horizontal scaling. Both are shorter than UUIDs, making them better for URLs and client-side storage. NanoID is particularly popular in frontend applications where bundle size matters — the library is only 130 bytes. ### Selection Guide Use UUID v7 or ULID for database primary keys where sort order matters. Choose NanoID for URL slugs and client-facing identifiers where brevity is valued. Stick with UUID v4 when you need maximum interoperability with existing systems. Avoid sequential integers for public-facing IDs, as they leak information about your system's scale and growth rate. ### How to Generate Secure Passphrases Passphrases are easier to remember than random passwords while being equally secure. Learn how to generate strong, memorable passphrases. - URL: https://peasygen.com/guides/how-to-generate-secure-passphrases/ - Category: How-To - Reading time: 1 min - Words: 185 Key takeaways: - A password like `X#9kL!2m` is hard to remember. - Diceware uses physical dice to select words from a list of 7,776 words. - Using separators (hyphens, spaces, dots) between words adds minimal entropy but greatly improves readability. - Don't choose words yourself — human choices are predictable. ## Passwords vs Passphrases A password like `X#9kL!2m` is hard to remember. A passphrase like `correct-horse-battery-staple` is easy to remember and actually harder to crack due to its length. Entropy depends on length and randomness, not complexity. ## Diceware Method Diceware uses physical dice to select words from a list of 7,776 words. Each word adds ~12.9 bits of entropy. A 6-word passphrase has ~77 bits of entropy — comparable to a random 12-character password. ## Recommended Length | Words | Entropy | Crack Time (1T guesses/sec) | |-------|---------|---------------------------| | 4 | ~51 bits | Days | | 5 | ~64 bits | Years | | 6 | ~77 bits | Centuries | | 7 | ~90 bits | Heat death of universe | ## Word Separator Using separators (hyphens, spaces, dots) between words adds minimal entropy but greatly improves readability. Some systems require special characters — adding one number and one symbol to a passphrase satisfies complexity requirements. ## Avoiding Patterns Don't choose words yourself — human choices are predictable. Use a cryptographically secure random generator. Avoid song lyrics, book quotes, and common phrases. ### How to Build a CSS Color Palette Generator Creating consistent color palettes is essential for design systems. Learn how to generate HSL-based palettes and CSS custom property scales. - URL: https://peasygen.com/guides/how-to-build-css-color-palette/ - Category: How-To - Reading time: 1 min - Words: 171 Key takeaways: - HSL (Hue, Saturation, Lightness) is the most intuitive color model for palette generation. - A standard palette includes shades from 50 (lightest) to 950 (darkest), following the Tailwind CSS convention. - Map palette values to semantic tokens: `--color-primary`, `--color-danger`, `--color-success`. - OKLCH improves on HSL by producing perceptually uniform scales — each lightness step looks equally different to human eyes. - After generating a palette, verify that text/background combinations meet WCAG contrast requirements. ## HSL: The Designer's Color Model HSL (Hue, Saturation, Lightness) is the most intuitive color model for palette generation. By keeping hue constant and varying lightness from 5% to 95%, you create a consistent shade scale from darkest to lightest. ## Generating a 10-Step Scale A standard palette includes shades from 50 (lightest) to 950 (darkest), following the Tailwind CSS convention. Each step reduces lightness by roughly 8-10 percentage points. ## Semantic Color Tokens Map palette values to semantic tokens: `--color-primary`, `--color-danger`, `--color-success`. This abstraction lets you change the entire palette by updating a single hue value. ## OKLCH: Better Perceptual Uniformity OKLCH improves on HSL by producing perceptually uniform scales — each lightness step looks equally different to human eyes. HSL scales can appear uneven because human perception of lightness is nonlinear. ## Accessibility Verification After generating a palette, verify that text/background combinations meet WCAG contrast requirements. Light backgrounds need dark text (shade 900 on shade 50) and vice versa. Aim for at least 4.5:1 contrast ratio for normal text. ### How to Generate UUIDs and Unique Identifiers Unique identifiers are fundamental to distributed systems. Learn the differences between UUID v4, v7, ULID, and other ID formats and when to use each. - URL: https://peasygen.com/guides/how-to-generate-uuids/ - Category: How-To - Reading time: 1 min - Words: 197 Key takeaways: - In distributed systems, databases, and APIs, every record needs a unique identifier. - UUID v4 generates 122 bits of randomness, producing identifiers like `550e8400-e29b-41d4-a716-446655440000`. - UUID v7 embeds a Unix timestamp in the first 48 bits, making IDs sortable by creation time. - ULID (Universally Unique Lexicographically Sortable Identifier) encodes time and randomness in a 26-character Crockford Base32 string. ## Why Unique IDs Matter In distributed systems, databases, and APIs, every record needs a unique identifier. Auto-incrementing integers work for single databases but fail in distributed environments where multiple systems create records simultaneously. ## UUID v4: Random UUID v4 generates 122 bits of randomness, producing identifiers like `550e8400-e29b-41d4-a716-446655440000`. The collision probability is astronomically low — you'd need to generate 2.71 quintillion UUIDs to have a 50% chance of collision. ## UUID v7: Time-Sorted UUID v7 embeds a Unix timestamp in the first 48 bits, making IDs sortable by creation time. This is ideal for database primary keys because sorted inserts are more efficient for B-tree indexes. ## ULID: Lexicographic Sorting ULID (Universally Unique Lexicographically Sortable Identifier) encodes time and randomness in a 26-character Crockford Base32 string. ULIDs sort correctly as strings, avoiding the need for special comparison logic. ## Choosing the Right Format | Format | Sortable | Size | URL-safe | |--------|---------|------|----------| | UUID v4 | No | 36 chars | No (hyphens) | | UUID v7 | Yes | 36 chars | No | | ULID | Yes | 26 chars | Yes | | Snowflake | Yes | 19 digits | Yes | ### Random Number Generation Best Practices Understand the differences between pseudo-random and cryptographic random number generation for various use cases. - URL: https://peasygen.com/guides/random-number-generation-best-practices/ - Category: Best Practice - Reading time: 1 min - Words: 233 ## Random Number Generation Not all random numbers are created equal. The distinction between pseudo-random number generators (PRNGs) and cryptographically secure random number generators (CSPRNGs) matters enormously depending on your use case. ### Pseudo-Random vs Cryptographic Random PRNGs like Mersenne Twister produce statistically uniform distributions that are perfectly adequate for simulations, games, and sampling. However, given enough output, an attacker can predict future values. CSPRNGs (like those provided by the Web Crypto API or /dev/urandom) use entropy from hardware events, making their output unpredictable even to someone who has seen billions of previous values. ### Choosing the Right Generator Use CSPRNGs for security-sensitive operations: generating passwords, API keys, session tokens, encryption keys, nonces, and salts. Use PRNGs for non-security applications: shuffling playlists, Monte Carlo simulations, procedural content generation, and A/B test bucketing. Never use Math.random() for anything security-related. ### Common Pitfalls Seeding a PRNG with the current timestamp gives only ~31 bits of entropy, making it trivially predictable. Modulo bias when constraining random numbers to a range produces non-uniform distributions — use rejection sampling instead. Generating random strings by concatenating random characters can produce unexpectedly short strings if the alphabet contains problematic characters. ### Browser-Based Generation The Web Crypto API (crypto.getRandomValues()) provides CSPRNG access in browsers without any external dependencies. For generating random UUIDs, use crypto.randomUUID() which is supported in all modern browsers. These APIs work entirely client-side with no server communication required. ### Troubleshooting Data Generator Output Issues Fix common issues with generated data including encoding problems, format mismatches, and validation failures. - URL: https://peasygen.com/guides/troubleshooting-data-generator-output/ - Category: Troubleshooting - Reading time: 1 min - Words: 294 Key takeaways: - Generated data can fail in subtle ways that real data wouldn't. - Always specify UTF-8 encoding explicitly in your output format. - Zip codes, IDs, and similar fields should always be generated as strings. ## Troubleshooting Data Generation Generated data can fail in subtle ways that real data wouldn't. Understanding common failure modes helps you create more robust test datasets and catch generation bugs early. ### Encoding Issues Generated text containing Unicode characters (accents, CJK, emoji) may produce mojibake when imported into systems expecting ASCII or Latin-1. Always specify UTF-8 encoding explicitly in your output format. For CSV files, include a BOM (byte order mark) if the target system is Excel, which uses the BOM to detect encoding. ### Format Mismatches JSON generators may produce numbers where strings are expected, or vice versa. Phone numbers like "0012345678" lose their leading zero when treated as numbers. Zip codes, IDs, and similar fields should always be generated as strings. Dates in ambiguous formats (01/02/2025 — January 2nd or February 1st?) cause silent data corruption across systems with different locale settings. ### Referential Integrity Failures When generating related datasets, foreign key references to non-existent parent records cause import failures. Generate parent tables first, collect their IDs, and use only those IDs when generating child records. Verify referential integrity before export with a validation pass that checks every FK reference. ### Value Distribution Problems Uniform random distributions rarely match real-world patterns. If 80% of your real users are in 3 countries, your test data should reflect that. Zipf distributions for name popularity, log-normal for purchase amounts, and exponential for inter-event times are more realistic than uniform random sampling. ### Troubleshooting Checklist Verify the character encoding of your output file. Check that numeric fields with leading zeros are preserved as strings. Validate all foreign key references point to existing parent records. Compare value distributions against production data patterns. Test import into the target system with a small sample before generating the full dataset. ### Hash Generator Selection Guide Choose the right hash algorithm for checksums, passwords, content addressing, and data integrity verification. - URL: https://peasygen.com/guides/hash-generator-selection-guide/ - Category: Comparison - Reading time: 1 min - Words: 253 Key takeaways: - Different hash algorithms serve fundamentally different purposes. - MD5 and SHA-1 are cryptographically broken but still acceptable for non-security checksums where speed matters and collision resistance is not critical. - ### Password Hashing Never use SHA-256 or MD5 for passwords — they're designed to be fast, which helps attackers. - The hash becomes the identifier — identical content always produces the same hash, enabling deduplication and integrity verification in a single operation. ## Hash Generator Selection Different hash algorithms serve fundamentally different purposes. Using a fast hash for passwords or a slow hash for checksums wastes either security or performance. ### Checksum and Integrity Hashes For file integrity verification and deduplication, use SHA-256 or BLAKE3. SHA-256 is universally supported and produces a 64-character hex string. BLAKE3 is 5-10x faster while being equally secure — ideal for hashing large files or many small files. MD5 and SHA-1 are cryptographically broken but still acceptable for non-security checksums where speed matters and collision resistance is not critical. ### Password Hashing Never use SHA-256 or MD5 for passwords — they're designed to be fast, which helps attackers. Use bcrypt, scrypt, or Argon2id specifically designed to be slow and memory-hard. Argon2id is the current recommendation: it resists both GPU attacks (memory-hard) and side-channel attacks. Configure the work factor so hashing takes 200-500ms on your server hardware. ### Content Addressing For content-addressable storage (like Git or IPFS), use SHA-256. The hash becomes the identifier — identical content always produces the same hash, enabling deduplication and integrity verification in a single operation. For shorter identifiers, truncate the hash (first 8-12 characters) with awareness of the birthday problem collision probability. ### HMAC and Authentication When you need to verify both integrity and authenticity (the data wasn't modified AND it came from a trusted source), use HMAC with SHA-256. HMAC combines a secret key with the hash, preventing attackers from forging valid hashes. Use this for API request signing, webhook verification, and session tokens. ### Secure Random Number Generation: When Math.random() Isn't Enough Math.random() is fine for shuffling a playlist but dangerous for passwords, tokens, and cryptographic applications. Learn when and how to use cryptographically secure random generators. - URL: https://peasygen.com/guides/secure-random-generation-guide/ - Category: Best Practice - Reading time: 1 min - Words: 241 ## The Problem with Math.random() JavaScript's Math.random() and similar standard library random functions use pseudorandom number generators (PRNGs). Given the seed, the entire sequence is predictable. This is fine for games, simulations, and UI effects, but disastrous for security-sensitive applications. ### When You Need CSPRNG Use a Cryptographically Secure Pseudo-Random Number Generator (CSPRNG) for: password generation, session tokens, API keys, encryption keys, CSRF tokens, one-time passwords, and any value an attacker could benefit from predicting. ### Platform-Specific APIs In browsers, use `crypto.getRandomValues()` which draws from the operating system's entropy pool. In Node.js, use `crypto.randomBytes()` or `crypto.randomUUID()`. In Python, use `secrets.token_hex()`, `secrets.token_urlsafe()`, or `secrets.choice()`. Never implement your own random number generator for security purposes. ### Common Mistakes Using Math.random() for token generation — an attacker can predict subsequent tokens after observing enough output. Seeding a PRNG with a predictable value (timestamp, PID) — the attacker can reproduce the seed. Reducing entropy by truncating random output — a 128-bit random value truncated to 32 bits has only 32 bits of security. Using modulo to restrict range — `random % n` introduces bias when n doesn't divide evenly into the PRNG's output range. ### Entropy Sources Operating systems gather entropy from hardware events: disk I/O timing, network packet timing, mouse movements, keyboard input. /dev/urandom (Linux) and CryptGenRandom (Windows) maintain entropy pools that CSPRNG functions draw from. On headless servers with minimal I/O, consider hardware random number generators (Intel RDRAND, ARM RNDR) for additional entropy. ### Favicon Generator Best Practices for All Platforms Generate a complete favicon set for browsers, mobile devices, and PWAs from a single source image. - URL: https://peasygen.com/guides/favicon-generator-all-platforms/ - Category: How-To - Reading time: 2 min - Words: 321 ## Generating Favicons A complete favicon set ensures your site icon appears correctly across all browsers, operating systems, and contexts — from browser tabs to mobile home screens to desktop shortcuts. ### Required Favicon Files favicon.ico (32×32): legacy browser tabs and bookmarks. icon.svg: modern browsers that support SVG favicons with dark mode adaptation. apple-touch-icon.png (180×180): iOS home screen and Safari. icon-192.png: Android Chrome and PWA. icon-512.png: PWA splash screens and high-DPI devices. A web manifest file (manifest.webmanifest) references the PNG icons for PWA installation. ### Design Constraints Favicons display at tiny sizes — 16×16 to 32×32 pixels in browser tabs. Detail gets lost. Use simple shapes, bold colors, and strong contrast. Text is unreadable at favicon sizes unless it's a single letter with heavy weight. Test at actual display size, not zoomed in. What looks good at 512×512 may be an unrecognizable blob at 16×16. ### SVG Favicon Benefits SVG favicons scale perfectly to any size. More importantly, they can adapt to dark mode using CSS `prefers-color-scheme` media queries inside the SVG. A dark logo on a light background in light mode, switching to a light logo on a dark background in dark mode. Browser support for SVG favicons is excellent in modern browsers. ### Generation From Source Start with a 512×512 PNG or SVG source image. Browser-based generators produce all required sizes and the HTML markup. The generator should create the ICO file (which can contain multiple sizes internally), the Apple touch icon with proper padding (Apple adds rounded corners automatically — don't include them in the source), and the manifest file. ### Common Mistakes Including rounded corners in Apple touch icons (iOS adds them automatically — your pre-rounded corners create a double-rounded effect). Using transparency in apple-touch-icon.png (iOS replaces transparency with black). Forgetting the manifest.webmanifest file (PWA installation … ### AI Text Generator Comparison: GPT vs Claude vs Gemini Compare leading AI text generators by capability, accuracy, and best use cases. - URL: https://peasygen.com/guides/ai-text-generators-gpt-claude-gemini-comparison/ - Category: Comparison - Reading time: 1 min - Words: 260 Key takeaways: - Large language models have transformed content creation, coding assistance, and information synthesis. - GPT-4 and its variants excel at creative writing, code generation, and general-purpose tasks. - Claude focuses on safety, accuracy, and nuanced understanding. - Gemini integrates deeply with Google's search and knowledge infrastructure. - For one-off creative tasks, any model works well — try your preferred interface. ## The AI Text Generation Landscape Large language models have transformed content creation, coding assistance, and information synthesis. The three leading models — OpenAI's GPT, Anthropic's Claude, and Google's Gemini — each have distinct strengths. Understanding their differences helps you choose the right tool for specific tasks. ## GPT (OpenAI) GPT-4 and its variants excel at creative writing, code generation, and general-purpose tasks. The ChatGPT interface is the most widely adopted. Strengths include broad knowledge, strong coding ability, image understanding (GPT-4V), and extensive plugin/tool ecosystem. Best for: creative content, coding assistance, and tasks requiring tool integration. ## Claude (Anthropic) Claude focuses on safety, accuracy, and nuanced understanding. It handles long documents exceptionally well with large context windows. Claude excels at careful analysis, following complex instructions, and maintaining consistency across long conversations. Best for: document analysis, careful reasoning tasks, technical writing, and conversations requiring nuanced understanding. ## Gemini (Google) Gemini integrates deeply with Google's search and knowledge infrastructure. It handles multimodal inputs (text, images, video) natively. Gemini Ultra performs competitively on benchmarks while offering integration with Google Workspace tools. Best for: tasks requiring current information, multimodal understanding, and Google ecosystem integration. ## Practical Selection Guide For one-off creative tasks, any model works well — try your preferred interface. For code generation, GPT and Claude both excel. For analyzing long documents (50+ pages), Claude's extended context is advantageous. For tasks requiring real-time information, Gemini's search integration helps. For privacy-sensitive tasks, consider which provider's data policies align with your requirements. Most professionals use multiple models, choosing based on the specific task at hand. ### AI Image Generation Prompting Techniques Write effective prompts for AI image generators to get consistent, high-quality visual results. - URL: https://peasygen.com/guides/ai-image-generation-prompting-techniques/ - Category: How-To - Reading time: 2 min - Words: 304 Key takeaways: - AI image generation quality depends heavily on prompt engineering. - Follow this framework: Subject + Style + Composition + Lighting + Quality modifiers. - Specifying the artistic medium dramatically affects output: "oil painting," "watercolor illustration," "3D render," "photograph," "pencil sketch," "vector illustration." Add art movement references for specific aesthetics: "Art Nouveau," "Bauhaus," "Impressionist," "cyberpunk." Camera and lens terms work for photographic styles: "shot on Canon 5D," "85mm portrait lens," "wide-angle lens." - Vague prompts ("a nice landscape") produce generic results. - Start with a simple prompt and iterate. ## The Art of AI Image Prompting AI image generation quality depends heavily on prompt engineering. A well-crafted prompt can mean the difference between a usable professional image and an unusable mess. Understanding how models interpret text and which keywords produce specific visual effects is a learnable skill. ## Prompt Structure Follow this framework: Subject + Style + Composition + Lighting + Quality modifiers. Example: "A ceramic coffee cup on a wooden table, minimalist photography style, shallow depth of field, warm morning sunlight from the left, 8k, professional product photography." Each element guides a different aspect of the generated image. ## Style and Medium Keywords Specifying the artistic medium dramatically affects output: "oil painting," "watercolor illustration," "3D render," "photograph," "pencil sketch," "vector illustration." Add art movement references for specific aesthetics: "Art Nouveau," "Bauhaus," "Impressionist," "cyberpunk." Camera and lens terms work for photographic styles: "shot on Canon 5D," "85mm portrait lens," "wide-angle lens." ## Common Mistakes Vague prompts ("a nice landscape") produce generic results. Contradictory instructions confuse the model. Too many subjects in one prompt dilute focus. Neglecting negative prompts (what NOT to include) allows unwanted elements. Not specifying aspect ratio leads to default compositions that may not fit your layout. ## Iteration Strategy Start with a simple prompt and iterate. Test one variable at a time — change the style, then the lighting, then the composition. Save successful prompts as templates. Build a prompt library organized by use case. When a prompt produces a good result, note which specific terms contributed and reuse them. ## Ethical Considerations Be aware of AI-generated content policies on platforms where you publish. Disclose AI-generated images when required. Avoid generating images of real people without consent. Respect the training data concerns — some models are trained on copyrighted work. Consider using models trained on licensed … ### Random Data Generation for Testing and Development Generate realistic test data including names, addresses, and numbers for development workflows. - URL: https://peasygen.com/guides/random-data-generation-testing-development/ - Category: How-To - Reading time: 1 min - Words: 291 Key takeaways: - Using realistic test data uncovers bugs that simple test values miss. - Name generators should include diverse cultural names with various character sets and lengths. - Generating test data in the browser means no data leaves the user's machine — critical for privacy-conscious development environments. - Random data should respect constraints: email addresses should use valid TLD suffixes, phone numbers should have valid area codes, dates should be logically consistent (birth dates in the past, expiry dates in the future). - Seed your development databases with generated data using import scripts. ## Why Realistic Test Data Matters Using realistic test data uncovers bugs that simple test values miss. A name field tested only with "John" won't reveal issues with hyphens, apostrophes, or Unicode characters. Addresses tested only with US formats break when European formats appear. Realistic data improves test coverage and catches edge cases before production. ## Types of Random Data Name generators should include diverse cultural names with various character sets and lengths. Address generators should cover international formats (US ZIP, UK postcode, Japanese postal code). Phone numbers need proper country code formatting. Dates should span historical ranges and respect locale formatting. Financial data needs valid credit card numbers (using Luhn algorithm) and realistic amounts. ## Client-Side Generation Benefits Generating test data in the browser means no data leaves the user's machine — critical for privacy-conscious development environments. JavaScript libraries and web tools can produce millions of records instantly. No API calls, no rate limits, no costs. The generated data can be exported to CSV, JSON, or SQL format for direct use in development databases. ## Data Quality Considerations Random data should respect constraints: email addresses should use valid TLD suffixes, phone numbers should have valid area codes, dates should be logically consistent (birth dates in the past, expiry dates in the future). Names should be culturally appropriate when testing international features. Numeric data should follow realistic distributions (not uniform random). ## Integration with Development Workflows Seed your development databases with generated data using import scripts. Create fixture files for automated testing. Generate CSV files for testing import functionality. Use data generators in CI/CD pipelines to create fresh test data for each run. Consider data masking (generating fake data with the same statistical properties as production data) for more realistic testing. ### Lorem Ipsum Alternatives: Better Placeholder Text Compare placeholder text options beyond Lorem Ipsum for more realistic and useful design mockups. - URL: https://peasygen.com/guides/lorem-ipsum-alternatives-placeholder-text/ - Category: Comparison - Reading time: 1 min - Words: 263 Key takeaways: - Lorem Ipsum has been the standard placeholder text since the 1500s, but it has significant drawbacks for modern design work. - The best placeholder is real content. - When designing for specific languages, use placeholder text in that language. - For data-heavy interfaces (dashboards, tables, lists), random text is less useful than structured fake data. - Always indicate placeholder text is temporary — use a different color or add a watermark. ## Beyond Lorem Ipsum Lorem Ipsum has been the standard placeholder text since the 1500s, but it has significant drawbacks for modern design work. Its Latin-based character distribution doesn't match English (or any modern language), leading to inaccurate line length estimates. Clients sometimes think it's real content and approve layouts without reviewing actual copy. ## Real Content First The best placeholder is real content. Even draft copy gives a more accurate representation of the final design. If real content isn't available, use content from a similar context — a competitor's page, an industry article, or previous project copy. This reveals layout issues that Lorem Ipsum masks. ## Language-Specific Placeholders When designing for specific languages, use placeholder text in that language. Japanese, Arabic, and CJK languages have fundamentally different character widths and line-breaking rules. German text tends to be 30% longer than English equivalents. Russian uses wider Cyrillic characters. Using Latin placeholder text for these languages leads to layouts that break with real content. ## Structured Placeholder Data For data-heavy interfaces (dashboards, tables, lists), random text is less useful than structured fake data. Generate realistic names, dates, currency amounts, and status values. This reveals column width issues, number formatting problems, and alignment concerns that Lorem Ipsum cannot. ## Best Practices Always indicate placeholder text is temporary — use a different color or add a watermark. Set minimum and maximum content lengths to test both extremes. Include edge cases in placeholders: very long words, empty states, single-character entries, and special characters. Document the expected content type and length for each placeholder area to guide copywriters. ### How to Generate Secure Random Passwords Weak passwords remain the leading cause of account compromises. This guide explains the principles behind cryptographically secure password generation and how to create strong, memorable passwords for different use cases. - URL: https://peasygen.com/guides/how-to-generate-secure-random-passwords/ - Category: How-To - Reading time: 2 min - Words: 488 Key takeaways: - A password's strength is measured by its entropy — the number of bits of randomness it contains. - Entropy per character depends on the size of the character set. - JavaScript's `Math.random()` uses a pseudo-random number generator (PRNG) that is not cryptographically secure. - The classic approach: generate a string of random characters from a defined character set. - For password manager master passwords, use a 5-6 word passphrase (minimum 64 bits entropy). ## Why Password Strength Matters A password's strength is measured by its entropy — the number of bits of randomness it contains. Each bit doubles the number of possible combinations. A 40-bit password has roughly one trillion possible values, while an 80-bit password has over a sextillion. Modern password-cracking hardware can test billions of combinations per second, so high entropy is essential. ## Understanding Entropy ### Character Set Size Entropy per character depends on the size of the character set. Lowercase letters only (26 characters) provide about 4.7 bits per character. Adding uppercase doubles the set to 52 characters (5.7 bits each). Including digits brings it to 62 characters (5.95 bits each). Adding symbols reaches 94+ characters (about 6.5 bits each). ### Length vs Complexity Length is more important than complexity. A 20-character lowercase password (94 bits) is stronger than a 12-character mixed-case-symbol password (78 bits). Longer passwords are also easier to type correctly and less likely to trigger frustrating 'invalid password' errors. ## Cryptographic Randomness ### Why Math.random() Is Not Enough JavaScript's `Math.random()` uses a pseudo-random number generator (PRNG) that is not cryptographically secure. Its output can be predicted if the internal state is known. For password generation, always use `crypto.getRandomValues()` (Web Crypto API), which draws from the operating system's cryptographically secure random number generator. ### Client-Side Generation Generating passwords in the browser means the password never travels over the network and never exists on a server. This is the most private approach — the password exists only in the user's browser memory and clipboard. Tools that process everything client-side provide this guarantee by design. ## Password Generation Strategies ### Random Character Strings The classic approach: generate a string of random characters from a defined character set. A 16-character string from the full printable ASCII set provides about 104 … ### Secure Password Generation: Algorithms and Best Practices Explore the cryptographic random number generators behind secure password creation. Learn why Math.random() is never sufficient, how CSPRNG works, and the best practices for generating passwords in the browser. - URL: https://peasygen.com/guides/secure-password-generation-algorithms/ - Category: Best Practice - Reading time: 1 min - Words: 244 Key takeaways: - JavaScript's `Math.random()` uses a pseudorandom number generator (PRNG) that is fast but predictable. - The Web Crypto API provides `crypto.getRandomValues()`, which draws from the operating system's entropy pool. - Always use `crypto.getRandomValues()` or equivalent CSPRNG ## Why Math.random() Is Dangerous JavaScript's `Math.random()` uses a pseudorandom number generator (PRNG) that is fast but predictable. Its internal state can be recovered from a small number of observed outputs, allowing an attacker to predict future values. Never use `Math.random()` for security-sensitive operations like password or token generation. ## Cryptographically Secure Alternatives The Web Crypto API provides `crypto.getRandomValues()`, which draws from the operating system's entropy pool. On Linux this reads from `/dev/urandom`, on Windows from `BCryptGenRandom`, and on macOS from `SecRandomCopyBytes`. These sources collect entropy from hardware events — disk timing, mouse movements, and interrupt timing. ## Password Generation Strategies | Strategy | Entropy (typical) | Memorability | Example | | --- | --- | --- | --- | | Random characters (16) | ~105 bits | Very low | `kX9#mP2$vL7@nQ4&` | | Diceware (5 words) | ~64 bits | High | `table-crane-amber-frost-violin` | | Diceware (7 words) | ~90 bits | Medium | longer phrase | | Pronounceable (16) | ~60 bits | Medium | `boquimaletopusan` | ## Best Practices - Always use `crypto.getRandomValues()` or equivalent CSPRNG - Generate passwords of at least 16 characters or 5+ diceware words - Include characters from multiple Unicode categories when possible - Never truncate or modify generated passwords — it reduces entropy - Store generated passwords in a password manager immediately The Peasy password generator uses the Web Crypto API to create passwords entirely in your browser — no server communication, no logging, no storage. ### Random Data Generation for Software Testing Generating realistic random test data improves code coverage and catches edge cases that manual test data misses. This guide covers strategies for different data types and testing scenarios. - URL: https://peasygen.com/guides/random-data-generation-testing/ - Category: How-To - Reading time: 1 min - Words: 267 Key takeaways: - Static test fixtures test the same paths repeatedly. - Generate strings of varying lengths (empty, 1 char, max length, beyond max). - Faker** (Python/JS): Realistic fake names, addresses, companies, text - Always seed your random generator with a fixed value in CI. ## Why Random Test Data Static test fixtures test the same paths repeatedly. Random data generation (also called fuzzing or property-based testing) explores a wider input space, uncovering bugs that fixed test cases miss: buffer overflows, encoding errors, and boundary conditions. ## Data Types and Strategies ### Strings Generate strings of varying lengths (empty, 1 char, max length, beyond max). Include unicode characters, emoji, null bytes, RTL text, and SQL injection patterns to test input handling. ### Numbers Test boundary values: 0, -1, MAX_INT, MIN_INT, NaN, Infinity, very large floats, and numbers with many decimal places. These edge cases frequently cause arithmetic overflows. ### Dates Generate dates across time zones, leap years (Feb 29), century boundaries (2000, 2100), and DST transitions. Include timestamps at epoch (0), negative epoch, and far-future dates. ### Structured Data | Data Type | Strategy | |-----------|----------| | Email addresses | Valid format + edge cases (very long local parts, special chars) | | Phone numbers | Various international formats, with/without country codes | | URLs | Valid + malformed + extremely long paths | | JSON | Valid + deeply nested + circular refs + large arrays | ## Tools and Libraries - **Faker** (Python/JS): Realistic fake names, addresses, companies, text - **Hypothesis** (Python): Property-based testing with automatic shrinking - **fast-check** (TypeScript): Property-based testing for JS/TS - **QuickCheck** (Haskell, ported to many languages): The original property-based testing library ## Reproducibility Always seed your random generator with a fixed value in CI. Log the seed so that any failure can be reproduced. A random test that cannot be reproduced provides no actionable information. ### API Mock Data Generation for Frontend Development Frontend developers often need to work before the backend API is ready. Mock data generators create realistic API responses that match the expected schema, enabling parallel development. - URL: https://peasygen.com/guides/api-mock-data-generation/ - Category: Best Practice - Reading time: 1 min - Words: 289 Key takeaways: - Waiting for the backend to be complete before starting frontend work wastes time. - The simplest approach: create JSON files that mirror expected API responses. - Good mock servers simulate failure modes: - Cons: Setup overhead, must maintain mocks. - Pros: Always in sync with API contract. ## Why Mock APIs Waiting for the backend to be complete before starting frontend work wastes time. Mock APIs decouple the two teams, allowing parallel development with agreed-upon contracts (schemas). ## Approaches ### 1. Static JSON Files The simplest approach: create JSON files that mirror expected API responses. Serve them with a static file server or import directly in code. **Pros**: Zero setup, version-controlled. **Cons**: No dynamic behavior, stale quickly. ### 2. Mock Server Tools like MSW (Mock Service Worker), JSON Server, or Prism intercept API requests and return mock responses. MSW runs in the browser's service worker — no separate server process needed. **Pros**: Realistic network behavior, error simulation. **Cons**: Setup overhead, must maintain mocks. ### 3. Schema-Driven Generation Define your API with OpenAPI (Swagger) and use tools that auto-generate mock data from the schema. Libraries like Faker.js can populate schema-defined types with realistic values. **Pros**: Always in sync with API contract. **Cons**: Requires upfront schema definition. ## Mock Data Quality | Aspect | Bad Mock | Good Mock | |--------|---------|----------| | Names | 'Test User 1' | 'Alejandra Moreno' | | Dates | '2020-01-01' everywhere | Varied realistic dates | | IDs | 1, 2, 3 | UUIDs or realistic ID formats | | Lists | Always 3 items | Varying lengths (0, 1, 5, 20) | | Errors | Never tested | Include 404, 500, timeout scenarios | ## Error and Edge Case Simulation Good mock servers simulate failure modes: - Slow responses (add artificial latency) - Empty results (no data state) - Paginated results with varying page sizes - Authentication errors (401, 403) - Server errors (500, 503) - Network timeout Testing against these scenarios in development catches error handling bugs before they reach production. ### Random Name and Identity Generation for Testing Generating realistic fake identities for testing requires cultural diversity, consistent data relationships, and awareness of privacy regulations. - URL: https://peasygen.com/guides/random-name-identity-generation/ - Category: How-To - Reading time: 1 min - Words: 289 Key takeaways: - Testing a user registration flow with 'Test User 1' and 'Test User 2' misses internationalization bugs, name-length edge cases, and cultural formatting differences. - A useful test identity includes coordinated data: - Create locale-specific identities with `Faker('ja_JP')` for Japanese, `Faker('de_DE')` for German, etc. - Single-character first or last names - Never use combinations that match real people. ## Why Realistic Identities Matter Testing a user registration flow with 'Test User 1' and 'Test User 2' misses internationalization bugs, name-length edge cases, and cultural formatting differences. Realistic test identities catch these issues early. ## Name Diversity Considerations | Culture | Name Pattern | Edge Case | |---------|-------------|----------| | Western | First Last | Very long names (>50 chars) | | Hispanic | First Paternal Maternal | Two last names | | Chinese | Family Given | Family name first | | Icelandic | Given Patronymic | No family name | | Mononymous | Single name | No last name at all | ## Consistent Identity Packages A useful test identity includes coordinated data: - Name matching the locale - Email based on the name - Phone number with country code - Address in the correct format for the locale - Date of birth producing a valid age - Username derived from the name ## Tools ### Faker (Python) Create locale-specific identities with `Faker('ja_JP')` for Japanese, `Faker('de_DE')` for German, etc. Each locale generates culturally appropriate names, addresses, and phone formats. ### RandomUser.me API A free API that returns complete random user profiles with photos, multiple nationalities, and consistent data relationships. Ideal for populating UI prototypes. ## Edge Cases to Generate - Single-character first or last names - Names with hyphens, apostrophes, and spaces (O'Brien, Mary-Jane, de la Cruz) - Very long names (test truncation and overflow) - Names with diacritics (Müller, Jiménez, Nguyễn) - Names in non-Latin scripts (Arabic, Chinese, Korean, Cyrillic) ## Privacy Warning Never use combinations that match real people. Some Faker outputs may accidentally generate a real name + real address combination. For published demos, use obviously fake names or append 'Test' to prevent confusion. ## Glossary (28 terms) ### Bcrypt (Bcrypt Password Hash) An adaptive password hashing function with a configurable work factor that slows brute-force attacks. - URL: https://peasygen.com/glossary/bcrypt/ ### Color Hex Code (Hexadecimal Color Code) A 6-character hex string (#RRGGBB) representing a color, with each pair encoding red, green, and blue intensity. - URL: https://peasygen.com/glossary/color-hex-code/ ### Color Palette Generator (Automatic Color Palette Generator) A tool that creates harmonious color schemes using color theory rules like complementary, analogous, or triadic relationships. - URL: https://peasygen.com/glossary/color-palette-generator/ ### CRC32 (Cyclic Redundancy Check 32-bit) A checksum algorithm producing a 32-bit value used to detect accidental data corruption in files and network transmissions. - URL: https://peasygen.com/glossary/crc32/ ### CSPRNG (Cryptographically Secure PRNG) A random number generator producing output unpredictable enough for cryptographic use (e.g. key generation). - URL: https://peasygen.com/glossary/csprng/ ### CUID (Collision-Resistant Unique Identifier) A unique ID format designed for horizontal scaling, combining a timestamp, counter, fingerprint, and random component. - URL: https://peasygen.com/glossary/cuid/ ### Diceware (Diceware Passphrase Method) A method for generating strong passphrases by rolling dice to select random words from a predefined wordlist. - URL: https://peasygen.com/glossary/diceware/ ### Faker Library (Fake Data Generator Library) A software library that generates realistic but fictitious data such as names, addresses, and emails for testing and prototyping. - URL: https://peasygen.com/glossary/faker-library/ ### Hash Generator (Cryptographic Hash Generator) A tool that computes hash digests of input data using algorithms like MD5, SHA-256, or SHA-3 for integrity verification. - URL: https://peasygen.com/glossary/hash-generator/ ### KSUID (K-Sortable Unique Identifier) A globally unique identifier that naturally sorts by creation time using a 4-byte timestamp prefix and 16-byte random payload. - URL: https://peasygen.com/glossary/ksuid/ ### Lorem Generator (Placeholder Text Generator) A tool that generates dummy text for design layouts, using lorem ipsum or other placeholder text patterns. - URL: https://peasygen.com/glossary/lorem-generator/ ### Markov Chain (Markov Chain Text Generator) A statistical model that generates text by predicting the next word or character based on the probability of preceding sequences. - URL: https://peasygen.com/glossary/markov-chain/ ### Markov Chain Text (Markov Chain Text Generator) A text generation method using statistical models where each word's probability depends on the preceding words. - URL: https://peasygen.com/glossary/markov-chain-text/ ### MD5 (Message Digest Algorithm 5) A 128-bit hash function producing a 32-character hexadecimal digest, now considered cryptographically broken. - URL: https://peasygen.com/glossary/md5/ ### Nanoid (Nano ID) A compact, URL-safe, unique string ID generator using a cryptographically strong random source. - URL: https://peasygen.com/glossary/nanoid/ ### Noise Function (Procedural Noise Function) An algorithm like Perlin or Simplex noise that produces smooth pseudo-random values, used to generate natural-looking textures and terrain. - URL: https://peasygen.com/glossary/noise-function/ ### OTP (One-Time Password) A temporary password valid for a single login session, generated by algorithms like HOTP or TOTP for two-factor authentication. - URL: https://peasygen.com/glossary/otp/ ### Passphrase (Passphrase) A sequence of random words used as a password, offering high entropy while remaining memorizable (e.g. Diceware method). - URL: https://peasygen.com/glossary/passphrase/ ### PRNG (Pseudorandom Number Generator) An algorithm that produces a sequence of numbers approximating random values from a deterministic seed. - URL: https://peasygen.com/glossary/prng/ ### QR Code Generator (QR Code Generator Tool) A tool that encodes text, URLs, or data into a QR code image following the ISO 18004 standard with configurable error correction. - URL: https://peasygen.com/glossary/qr-code-generator/ ### Seed Phrase Generator (Mnemonic Seed Phrase Generator) A tool that generates BIP-39 mnemonic phrases (12 or 24 words) used to derive cryptocurrency wallet keys. - URL: https://peasygen.com/glossary/seed-phrase-generator/ ### Seed Value (Random Seed Value) An initial value used to start a pseudorandom number generator, ensuring reproducible sequences when reused. - URL: https://peasygen.com/glossary/seed-value/ ### SHA-1 (Secure Hash Algorithm 1) A 160-bit cryptographic hash function, deprecated for security but still used for non-security checksums. - URL: https://peasygen.com/glossary/sha-1/ ### Slug Generator (URL Slug Generator) A tool that converts text into URL-safe slugs by lowercasing, replacing spaces with hyphens, and removing special characters. - URL: https://peasygen.com/glossary/slug-generator/ ### Snowflake ID (Snowflake ID) A 64-bit distributed unique ID format combining timestamp, worker ID, and sequence number (originated at Twitter). - URL: https://peasygen.com/glossary/snowflake-id/ ### ULID (Universally Unique Lexicographically Sortable Identifier) A 128-bit identifier combining a timestamp with randomness, encoded as a 26-character Crockford Base32 string. - URL: https://peasygen.com/glossary/ulid/ ### UUIDv4 (UUID Version 4) A randomly generated 128-bit universally unique identifier with a probability of collision near zero. - URL: https://peasygen.com/glossary/uuidv4/ ### UUIDv7 (UUID Version 7) A time-ordered UUID combining a Unix timestamp with random bits, enabling sortable unique identifiers. - URL: https://peasygen.com/glossary/uuidv7/ ## API Base URL: https://peasygen.com/api/v1/ | Endpoint | Description | |----------|-------------| | GET /api/v1/tools/ | List all tools (filterable by category) | | GET /api/v1/tools/{slug}/ | Tool detail with description, steps, FAQ | | GET /api/v1/categories/ | Tool categories | | GET /api/v1/formats/ | File formats reference | | GET /api/v1/formats/{slug}/ | Format detail with history, pros/cons | | GET /api/v1/conversions/ | Format conversion guides | | GET /api/v1/glossary/ | Terminology with definitions | | GET /api/v1/glossary/{slug}/ | Term with simple + technical explanations, code examples, references | | GET /api/v1/guides/ | Educational guides (filterable by category, audience_level) | | GET /api/v1/guides/{slug}/ | Full guide with content, takeaways, ToC, related guides | | GET /api/v1/use-cases/ | Real-world use cases by industry | | GET /api/v1/search/?q={query} | Cross-model search | | GET /api/v1/sites/ | All 16 Peasy sites | OpenAPI spec: https://peasygen.com/api/openapi.json ## Content Negotiation All pages support Markdown output for AI agents: - Add `?format=md` to any page URL - Or send `Accept: text/markdown` header ## Platform Stats - 251 tools across 16 sites - 131 file formats documented - 1484 format conversion guides - 695 glossary terms (with simple + technical explanations) - 645 educational guides (avg 1,308 words) - 302 real-world use cases