https://github.com/faker-ruby/faker
A library for generating fake data such as names, addresses, and phone numbers.
https://github.com/faker-ruby/faker
Keywords
fake ruby
Keywords from Contributors
activerecord mvc activejob rubocop static-code-analysis code-formatter rubygems rack rspec sidekiq
Last synced: about 14 hours ago
JSON representation
Repository metadata
A library for generating fake data such as names, addresses, and phone numbers.
- Host: GitHub
- URL: https://github.com/faker-ruby/faker
- Owner: faker-ruby
- License: mit
- Created: 2008-12-24T17:20:37.000Z (about 17 years ago)
- Default Branch: main
- Last Pushed: 2026-02-25T19:08:26.000Z (5 days ago)
- Last Synced: 2026-02-25T20:58:44.357Z (5 days ago)
- Topics: fake, ruby
- Language: Ruby
- Homepage:
- Size: 14.3 MB
- Stars: 11,610
- Watchers: 127
- Forks: 3,179
- Open Issues: 18
- Releases: 49
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: License.txt
- Security: SECURITY.md
README.md
Faker

Quick links
Features
- Internet: Email addresses, Passwords, Domains, etc.
- Date and Time: Travel back in time or to the future.
- Person: Names, Genders, Bios, Job titles, and more.
- Number and String: Random numbers and strings.
- Location: Addresses, Zip Codes, Street Names, States, and Countries.
- Finance: Account Details, Transactions, and Crypto Addresses.
- Localization - Customize faker with over 40 locales to generate realistic-looking Names, Addresses, and Phone Numbers.
Note: The generated names, addresses, emails, phone numbers, and/or other data might return valid information. Please be careful when using faker in your tests.
For a complete list of the generators, see Generators.
Getting Started
Start by including faker in your Gemfile:
gem 'faker'
Then run bundle install.
Usage
require 'faker'
Faker::Name.name #=> "Christophe Bartell"
Faker::Internet.password #=> "Vg5mSvY1UeRg7"
Faker::Internet.email #=> "eliza@mann.test"
Faker::Address.full_address #=> "5479 William Way, East Sonnyhaven, LA 63637"
Faker::Markdown.emphasis #=> "Quo qui aperiam. Amet corrupti distinctio. Sit quia *dolor.*"
Faker::Lorem.paragraph #=> "Recusandae minima consequatur. Expedita sequi blanditiis. Ut fuga et."
Faker::Alphanumeric.alpha(number: 10) #=> "zlvubkrwga"
Faker::ProgrammingLanguage.name #=> "Ruby"
Table of Contents
Notes
- While Faker generates data at random, returned values are not guaranteed to be unique by default. To explicitly specify when you require unique values, see Ensuring Unique Values.
- Values also can be deterministic if you use the deterministic feature, see Deterministic Random.
- This is the
mainbranch of Faker and may contain changes that are not yet released. The list of all versions is available here.
Ensuring unique values
To ensure Faker generates unique values, prefix your method call with unique:
Faker::Name.unique.name # This will return a unique name every time it is called
If too many unique values are requested from a generator that has a limited
number of potential values, a Faker::UniqueGenerator::RetryLimitExceeded
exception may be raised. It is possible to clear the record of unique values
that have been returned, for example between tests.
Faker::Name.unique.clear # Clears used values for Faker::Name
Faker::UniqueGenerator.clear # Clears used values for all generators
You can also give some already-used values to the unique generator if you have
collisions with the generated data (i.e., using FactoryBot with random and
manually set values).
# Faker::<generator>.unique.exclude(method, arguments, list)
# Add 'azerty' and 'wxcvbn' to the string generator with 6 char length
Faker::Lorem.unique.exclude :string, [number: 6], %w[azerty wxcvbn]
Deterministic Random
Faker supports seeding of its pseudo-random number generator (PRNG)
to provide deterministic output of repeated method calls.
Faker::Config.random = Random.new(42)
Faker::Lorem.word #=> "velit"
Faker::Lorem.word #=> "quisquam"
Faker::Config.random = Random.new(42)
Faker::Lorem.word #=> "velit"
Faker::Lorem.word #=> "quisquam"
Faker::Config.random = nil # seeds the PRNG using default entropy sources
Faker::Config.random.seed #=> 185180369676275068918401850258677722187
Faker::Lorem.word #=> "ipsam"
Localization
You may want Faker to print information depending on your location in the world.
To assist you in this, Faker uses the I18n gem to store strings and formats to
represent the names and postal codes of the area of your choosing.
Just set the locale you want as shown below, and Faker will take care of the rest.
Faker::Config.locale = 'es'
# or
Faker::Config.locale = :es
To override Faker's locales, and set it on threaded server environments
check out the locales README.
Minitest and Faker >= 2.22
To prevent Faker (version >= 2.22) from generating duplicate values when using Minitest,
you might need to add the following to the test_helper.rb or rails_helper.rb file:
Faker::Config.random = Random.new
Generators
To see the full list, check out the GENERATORS document.
Contributing
Note: We are not accepting proposals for new generators and locales. The Contributing guide has a few notes about this decision.
Take a look at the Contributing document for
instructions on setting up the repo on your machine, opening bug reports, understanding the codebase,
and creating a good pull request.
There is a Discord channel to discuss anything
regarding improvements or feature requests. This is not actively monitored by the current maintainers.
Thank you, contributors!
Versioning
Faker follows Semantic Versioning 2.0 as defined at https://semver.org.
Inspiration
Faker was inspired by Perl's Data::Faker library.
In the media
- 📰 With Great Humor Comes Great Developer Engagement - KTH Royal Institute of Technology research
- 🎧 Computer und Kommunikation 4.5.2024, komplette Sendung - Deutschland Funk Radio Interview
License
This code is free to use under the terms of the MIT license.
Owner metadata
- Name: Faker
- Login: faker-ruby
- Email:
- Kind: organization
- Description: We're committed to offering the best faker generators.
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/47637297?v=4
- Repositories: 1
- Last ynced at: 2024-03-25T18:40:56.080Z
- Profile URL: https://github.com/faker-ruby
GitHub Events
Total
- Release event: 2
- Delete event: 79
- Pull request event: 205
- Fork event: 43
- Issues event: 41
- Watch event: 307
- Issue comment event: 126
- Push event: 157
- Gollum event: 1
- Pull request review comment event: 38
- Pull request review event: 80
- Create event: 92
Last Year
- Release event: 1
- Delete event: 57
- Pull request event: 144
- Fork event: 27
- Issues event: 38
- Watch event: 199
- Issue comment event: 89
- Push event: 127
- Pull request review comment event: 20
- Gollum event: 1
- Pull request review event: 49
- Create event: 66
Committers metadata
Last synced: about 14 hours ago
Total Commits: 2,583
Total Committers: 1,042
Avg Commits per committer: 2.479
Development Distribution Score (DDS): 0.902
Commits in past year: 95
Committers in past year: 24
Avg Commits per committer in past year: 3.958
Development Distribution Score (DDS) in past year: 0.579
| Name | Commits | |
|---|---|---|
| Vitor Oliveira | v****o@g****m | 253 |
| Benjamin Curtis | b****s@g****m | 158 |
| dependabot[bot] | 4****]@u****m | 142 |
| dependabot-preview[bot] | 2****]@u****m | 67 |
| Connor Shea | c****a@g****m | 52 |
| Juha | j****s@o****m | 48 |
| Stefanni Brasil | s****l@g****m | 46 |
| Stefanni Brasil | s****l@p****e | 45 |
| danielTiringer | 5****r@u****m | 30 |
| Benjamin Curtis | b****n@b****m | 28 |
| Koichi ITO | k****o@g****m | 25 |
| Stephen A. Wilson | s****6@h****m | 24 |
| Sibi | s****i@p****n | 20 |
| Katrina Owen | k****n@g****m | 17 |
| gkunwar | g****9@g****m | 16 |
| Simon Fish | si@m****h | 13 |
| salexzee | s****b@c****m | 13 |
| Sudeep Tarlekar | s****r@g****m | 13 |
| Thiago Araujo | t****o@g****m | 12 |
| Yuko Miura | 4****n@u****m | 11 |
| Thiago Araujo | 7****o@u****m | 11 |
| Steven Atkinson | m****k@g****m | 11 |
| Bryan Mytko | b****o@g****m | 11 |
| danielTiringer | t****l@g****m | 10 |
| Pascal Schumacher | p****r@g****t | 10 |
| Geremia Taglialatela | t****a@u****m | 10 |
| Akira Matsuda | r****e@d****p | 10 |
| Tiago Farias | a****m@g****m | 9 |
| Cathy Cramer | c****r@r****m | 9 |
| Maxmiliano Franco Braga | m****o@g****m | 8 |
| and 1012 more... | ||
Committer domains:
- me.com: 7
- joshsoftware.com: 5
- github.com: 4
- shopify.com: 4
- klarna.com: 3
- yandex.ru: 3
- rootstrap.com: 3
- freshworks.com: 2
- nyu.edu: 2
- aol.com: 2
- hired.com: 2
- mac.com: 2
- posteo.de: 2
- gmx.com: 2
- gmx.net: 2
- ya.ru: 2
- laszlo.nu: 1
- bzf.se: 1
- andral.xyz: 1
- cs.berkeley.edu: 1
- utexas.edu: 1
- arthurka.eu: 1
- gospotcheck.com: 1
- bortz.co: 1
- adobe.com: 1
- rabidaudio.com: 1
- mossity.com: 1
- u.rochester.edu: 1
- moneytrack.io: 1
- change.org: 1
- bendyworks.com: 1
- codez.ch: 1
- pagefaultdesigns.com: 1
- trineo.co.nz: 1
- mesomorphic.co.uk: 1
- laposte.net: 1
- intriguos.com: 1
- alleycorpnord.com: 1
- davidmontesdeoca.net: 1
- phishme.com: 1
- 163.com: 1
- multunus.com: 1
- mojotech.com: 1
- gmail.no: 1
- mailyard.net: 1
- freeagent.com: 1
- wiremaze.com: 1
- tangosource.com: 1
- one99.pl: 1
- mobileeventguide.de: 1
- wepush.org: 1
- theproduct.works: 1
- upmc.edu: 1
- andela.com: 1
- enova.com: 1
- glatelier.org: 1
- onepagecrm.com: 1
- nampt-pc.(none): 1
- nerdgeschoss.de: 1
- madeindata.com: 1
- elbe.me: 1
- chriskottom.com: 1
- claytron.com: 1
- mashedkeyboard.me: 1
- vaporwa.re: 1
- forresty.com: 1
- mynorth.com: 1
- groupon.com: 1
- donaldpiret.com: 1
- schwenzien.org: 1
- ualberta.ca: 1
- headfirstproductions.ca: 1
- digitaldialogue.com.au: 1
- splitwise.com: 1
- plainprograms.com: 1
- miamioh.edu: 1
- next45.co: 1
- finc.com: 1
- segment7.net: 1
- amasses.net: 1
- handle.it: 1
- riseup.net: 1
- moneyforward.co.jp: 1
- moip.com.br: 1
- sovolve.com: 1
- slack-corp.com: 1
- eddorre.com: 1
- taryneast.org: 1
- cgore.com: 1
- weedmaps.com: 1
- ansfederal.com: 1
- sagacity.com.au: 1
- didcoe.id.au: 1
- redcanary.com: 1
- dio.jp: 1
- codingtestsite.com: 1
- mon.fish: 1
- psibi.in: 1
- proton.me: 1
- imaginea.com: 1
- careerlounge.com.au: 1
- kandrsoftware.com: 1
- katelovescode.com: 1
- leereilly.net: 1
- annema.me: 1
- martinbjeldbak.com: 1
- gmx.de: 1
- deployfx.com: 1
- blat.es: 1
- mishinev.com: 1
- external.twentyeighthealth.com: 1
- vizir.com.br: 1
- oraleye.com: 1
- suweller.com: 1
- rodas.mx: 1
- braingourmets.com: 1
- keksi.io: 1
- myitcv.org.uk: 1
- simplybusiness.co.uk: 1
- flextype.org: 1
- electriccarscheme.com: 1
- imeuble.info: 1
- tylerhunt.com: 1
- ucop.edu: 1
- katalyst.com.au: 1
- ayenci.com: 1
- andymikula.ca: 1
- dasari.me: 1
- eristiccode.com: 1
- tracefunc.com: 1
- jan-pieper.info: 1
- niva.co: 1
- siedlarz.com: 1
- sixtwothree.org: 1
- berkeley.edu: 1
- jasonrudolph.com: 1
- katherinehouse.com: 1
- aprescott.com: 1
- uniandes.edu.co: 1
- schilling.io: 1
- tiii.de: 1
- nerd.fi: 1
- tofugu.com: 1
- willj.net: 1
- zoshigayan.net: 1
- gapfish.com: 1
- hacktivista.org: 1
- jc00ke.com: 1
- liluo.org: 1
- masukomi.org: 1
- timothymorgan.info: 1
- fishpercolator.co.uk: 1
- airbnb.com: 1
- planetargon.com: 1
- roemerbakker.com: 1
- solutions-insurance.com: 1
- nilsgemeinhardt.de: 1
- pm.me: 1
- orien.io: 1
- bowlabs.org: 1
- kyrylo.org: 1
- catefamily.co.uk: 1
- nonick.ch: 1
- live.cn: 1
- wndx.com: 1
- kingandpartners.com: 1
- whoisjuliosantos.com: 1
- carlosribeiro.me: 1
- moretea.nl: 1
- zingysaturn.co.uk: 1
- michaellawrie.com: 1
- thoughtbot.com: 1
- nicholaserhardt.io: 1
- yahoo.co.uk: 1
- sosek.net: 1
- stellenticket.de: 1
- ediathome.de: 1
- mattw.co: 1
- ferreiramauricio.com: 1
- mauromorales.com: 1
- henryjenkins.name: 1
- kjarrigan.de: 1
- ihuerta.net: 1
- grudev.com: 1
- comsof.com: 1
- elsoul.nl: 1
- littleforestconsulting.com: 1
- naver.com: 1
- huyderman.com: 1
- padorpers.com: 1
- spacebabies.nl: 1
- tensorconclave.com: 1
- wolox.com.ar: 1
- chef.io: 1
- rusa.at: 1
- mail.ru: 1
- maslov.dev: 1
- fastmail.fm: 1
- tanda.co: 1
- inbox.ru: 1
- anassina.com: 1
- charterup.com: 1
- goldstar.com: 1
- hagedorn-software.de: 1
- applidium.com: 1
- napaswdev.com: 1
- nijibox.co.jp: 1
- teamnorthwoods.com: 1
- ukcloud.com: 1
- decielo.com: 1
- orange-ftgroup.com: 1
- takashi.me: 1
- the-pr-manager.com: 1
- ubuntu.ubuntu-domain: 1
- crm-box.ru: 1
- edgescan.com: 1
- codingzeal.com: 1
- outreach.io: 1
- carnivallabs.com: 1
- faceit-team.com: 1
- tworedkites.com: 1
- ryerson.ca: 1
- gtn.co.jp: 1
- alvareznavarro.es: 1
- mrhead.sk: 1
- starkast.net: 1
- diovani.com: 1
- slevermann.de: 1
- a1webconsulting.com: 1
- coley.co: 1
- kotiri.com: 1
- sunfox.org: 1
- sergiosantos.info: 1
- tjschuck.com: 1
- tanner.xyz: 1
- unifesp.br: 1
- wizcover.com: 1
- oxynum.fr: 1
- kohpeiss.dk: 1
- mcgeary.org: 1
- samoliver.com: 1
- skello.io: 1
- affirm.com: 1
- ibsglobalweb.com: 1
- bullseyehub.com: 1
- procore.com: 1
- pixelonce.com: 1
- ddlab.net: 1
- stitchfix.com: 1
- lockyy.com: 1
- persado.com: 1
- customink.com: 1
- adtsys.com.br: 1
- inflection.com: 1
- izea.com: 1
- errorstudio.co.uk: 1
Issue and Pull Request metadata
Last synced: about 18 hours ago
Total issues: 88
Total pull requests: 583
Average time to close issues: 7 months
Average time to close pull requests: 20 days
Total issue authors: 68
Total pull request authors: 136
Average comments per issue: 4.5
Average comments per pull request: 0.9
Merged pull request: 324
Bot issues: 1
Bot pull requests: 255
Past year issues: 21
Past year pull requests: 127
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 15 days
Past year issue authors: 13
Past year pull request authors: 25
Past year average comments per issue: 1.38
Past year average comments per pull request: 0.61
Past year merged pull request: 48
Past year bot issues: 0
Past year bot pull requests: 66
Top Issue Authors
- stefannibrasil (14)
- thdaraujo (4)
- ozydingo (2)
- PhiliGor (2)
- rocket-turtle (2)
- alextaujenis (2)
- danielnolan (1)
- schwern (1)
- Oli0li (1)
- calvinballing (1)
- elangovan-selvaraj (1)
- sjjbirch (1)
- nsilva-ta (1)
- dependabot[bot] (1)
- theycallmeswift (1)
Top Pull Request Authors
- dependabot[bot] (255)
- stefannibrasil (49)
- thdaraujo (21)
- keshavbiswa (11)
- alextaujenis (11)
- sudeeptarlekar (10)
- wonderer007 (6)
- connie-feng (5)
- ruban-thilak (4)
- fco-acuna (4)
- matthewmayer (4)
- garrettgregor (4)
- capak07 (4)
- francktrouillez (4)
- lexisvar (4)
Top Issue Labels
- 🐞 Issue: Bug (36)
- 💡 Issue: Feature Request (13)
- ⚒️ Improvement (7)
- 🎒 Beginner Friendly (6)
- 🏷️ Issue: Has Attached PR (4)
- 💭 Discussion (3)
- 🙏🏽 Issue: Needs More Information (2)
- 🤔 Needs Decision (2)
- 🙏🏽 Issue: PR Welcome (2)
- Chores (2)
- Deprecation (1)
- rubyconf2023 (1)
- 🤔 Issue: Needs to Investigate (1)
- 🥐 Issue: Flaky Spec (1)
- Won't Fix (1)
- Breaking change (1)
- dependencies (1)
Top Pull Request Labels
- dependencies (255)
- ruby (62)
- 🙏🏽 PR: Needs Further Updates (20)
- ⏲️ PR: In Queue for Review (15)
- ⚒️ Improvement (9)
- 🌐 Update Locales (9)
- 🐞 PR: Bugfix (8)
- ⭐ PR: Feature (8)
- 🏃🏽 PR: In Progress (7)
- rubyconf2023 (7)
- Stale (4)
- 🙏🏽 PR: Needs Documentation (4)
- 🙏🏽 PR: Needs Tests (4)
- ⌛ PR: Needs More Information (2)
- 🤔 Needs Decision (2)
- Deprecation (2)
- github_actions (2)
- 💭 Discussion (1)
- 💡 Issue: Feature Request (1)
Package metadata
- Total packages: 9
-
Total downloads:
- rubygems: 616,703,101 total
- Total docker downloads: 574,390,890
- Total dependent packages: 1,074 (may contain duplicates)
- Total dependent repositories: 143,796 (may contain duplicates)
- Total versions: 281
- Total maintainers: 4
gem.coop: faker
Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.
- Homepage: https://github.com/faker-ruby/faker
- Documentation: http://www.rubydoc.info/gems/faker/
- Licenses: MIT
- Latest release: 3.6.0 (published about 1 month ago)
- Last Synced: 2026-03-02T13:02:50.361Z (about 18 hours ago)
- Versions: 94
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 308,389,310 Total
- Docker Downloads: 287,195,445
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.027%
- Downloads: 0.08%
- Maintainers (4)
rubygems.org: faker
Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.
- Homepage: https://github.com/faker-ruby/faker
- Documentation: http://www.rubydoc.info/gems/faker/
- Licenses: MIT
- Latest release: 3.6.0 (published about 1 month ago)
- Last Synced: 2026-03-02T00:31:30.731Z (1 day ago)
- Versions: 94
- Dependent Packages: 1,074
- Dependent Repositories: 143,796
- Downloads: 308,313,791 Total
- Docker Downloads: 287,195,445
-
Rankings:
- Dependent packages count: 0.046%
- Downloads: 0.084%
- Forks count: 0.098%
- Dependent repos count: 0.105%
- Stargazers count: 0.109%
- Average: 0.157%
- Docker downloads count: 0.502%
- Maintainers (4)
proxy.golang.org: github.com/faker-ruby/faker
- Homepage:
- Documentation: https://pkg.go.dev/github.com/faker-ruby/faker#section-documentation
- Licenses: mit
- Latest release: v3.6.0+incompatible (published about 1 month ago)
- Last Synced: 2026-02-19T08:52:39.549Z (12 days ago)
- Versions: 87
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 6.999%
- Average: 8.173%
- Dependent repos count: 9.346%
debian-12: ruby-faker
- Homepage: https://github.com/faker-ruby/faker
- Documentation: https://packages.debian.org/bookworm/ruby-faker
- Licenses:
- Latest release: 2.21.0-1 (published 18 days ago)
- Last Synced: 2026-02-12T23:29:00.339Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- actions/checkout v3 composite
- ruby/setup-ruby v1 composite
- actions/checkout v4 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
- benchmark >= 0
- minitest = 5.26.1
- pry = 0.15.2
- rake = 13.3.1
- rubocop = 1.81.7
- rubocop-minitest = 0.38.2
- rubocop-rake = 0.7.1
- simplecov = 0.22.0
- test-unit = 3.7.1
- timecop = 0.9.10
- yard = 0.9.37
- i18n >= 1.8.11, < 2
- ast 2.4.3
- benchmark 0.5.0
- bundler 2.4.22
- coderay 1.1.3
- concurrent-ruby 1.3.5
- docile 1.4.1
- faker 3.5.3
- i18n 1.14.7
- json 2.16.0
- language_server-protocol 3.17.0.5
- lint_roller 1.1.0
- method_source 1.1.0
- minitest 5.26.1
- parallel 1.27.0
- parser 3.3.10.0
- power_assert 3.0.1
- prism 1.6.0
- pry 0.15.2
- racc 1.8.1
- rainbow 3.1.1
- rake 13.3.1
- regexp_parser 2.11.3
- rubocop 1.81.7
- rubocop-ast 1.48.0
- rubocop-minitest 0.38.2
- rubocop-rake 0.7.1
- ruby-progressbar 1.13.0
- simplecov 0.22.0
- simplecov-html 0.13.2
- simplecov_json_formatter 0.1.4
- test-unit 3.7.1
- timecop 0.9.10
- unicode-display_width 3.2.0
- unicode-emoji 4.1.0
- yard 0.9.37
Score: 37.20832893697207