PackageTrack
Sign in Get early access

phone_numbers_parser

Dart library for parsing phone numbers. Inspired by Google's libphonenumber and PhoneNumberKit for ios.

9.0.25 281K downloads/mo #715 most downloaded on pub.dev cedvdb/phone_number_parser

What this package is like to depend on

Last release 23 days ago

01 Aug 2026

Ships on a steady schedule

a new release about every 4 weeks

Most releases are documented

notes for 59 of 66 stable releases

1 version withdrawn

withdrawn after publishing

5 years old

67 releases · first in 2021

11 releases in the last 12 months

see the full history below

Release timeline

67 releases · Apr 2021 to Aug 2026
2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 67
  1. 9.0.25 01 Aug 2026
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  2. 9.0.24 01 Jul 2026
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  3. 9.0.23 01 Jun 2026
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  4. 9.0.22 01 May 2026
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  5. 9.0.21 01 Apr 2026
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  6. 9.0.20 01 Mar 2026
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  7. 9.0.19 01 Feb 2026
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  8. 9.0.18 01 Jan 2026
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  9. 9.0.17 01 Dec 2025
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  10. 9.0.16 01 Nov 2025
    Release notes

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Open source →
    Release notes
    • Upgrade metadata
    Open source →
  11. 9.0.15 01 Oct 2025
    Release notes
    • Upgrade metadata
    Open source →
  12. 9.0.11 25 Aug 2025

    Nothing published for this version

  13. 9.0.3 02 Dec 2024
    Release notes
    • Upgrade metadata
    Open source →
  14. 9.0.2 10 Nov 2024
    Release notes
    • Fix format for argentinian phone number
    Open source →
  15. 9.0.1 30 Sep 2024
    Release notes
    • Fix wrong format for some countries
    Open source →
  16. 9.0.0 06 Sep 2024
    Release notes
    • Added a format parameter to choose between international and national format
    • Format now uses the national format by default
    Open source →
  17. 8.3.0 29 May 2024
    Release notes
    • added support for remaining phoneNumberTypes (thanks @cottonman132 )
    Open source →
  18. 8.2.2 21 May 2024
    Release notes
    • update metadata
    Open source →
  19. 8.2.1 28 Feb 2024
    Release notes
    • add demo link in readme
    Open source →
  20. 8.2.0 28 Feb 2024
    Release notes
    • added VOIP support
    • udpated metadata
    • Removed MinMaxUtils that was unused internally. While exported publically it was undocumented.
    Open source →
  21. 8.1.3 04 Feb 2024
    Release notes
    • deprectate getFormattedNsn in favor of formatNsn
    Open source →
  22. 8.1.2 02 Feb 2024
    Release notes
    • lower meta dependency version for flutter compat
    Open source →
  23. 8.1.1 02 Feb 2024
    Release notes
    • updated metadata
    Open source →
  24. 8.1.0 07 Dec 2023
    Release notes
    • updated metadata
    • fix for local phone numbers not parsing accurately (issue 46)
    • phone numbers starting with the country code of the destination country will now return the phone number without the country code if the phone number is valid without it.
    • refactor some internal
    Open source →
  25. 8.0.0 23 Jun 2023
    Release notes
    • made it easier to contribute
    • remove dependency on dart_countries and phone_number_metadata and instead work as a monorepo for easier contribution.
    • upgrade metadata
    Open source →
  26. 7.0.2 19 Feb 2023
    Release notes
    • Changed behavior to not remove the country code from an incomplete phone number that did not start with an exit code.
    Open source →
  27. 7.0.1 19 Feb 2023
    Release notes
    • Fix issue where international phone numbers would be transformed as if those were local ones.
    Open source →
  28. 7.0.0 10 Aug 2022
    Release notes

    This major introduces a more accurate parsing logic taking into account caller and destination country.

    • add parse method which takes as parameters callerCountry and destinationCountry
    • [Breaking]: removed most factory methods on PhoneNumber in favor of parse, see readme
    • [Breaking]: renamed validate and validateWithLength to isValid and isValidateLength
    • updated metadata
    • PhoneNumber.findPotentialPhoneNumbers now returns a list of phone number when scanning text.
    Open source →
  29. 7.0.0+1 23 Sep 2022

    Nothing published for this version

  30. 6.0.1 10 Aug 2022 withdrawn
    Release notes
    • please use 6.0.0 or upgrade to 7.0.0, this is a faulty version.
    • deprecated factories
    Open source →
  31. 6.0.0 25 Jul 2022
    Release notes
    • [Breaking]: removed fromMap, toMap which have been replaced by fromJson(Map), toJson respectively.
    Open source →
  32. 5.0.5 22 May 2022
    Release notes
    • improved readme
    Open source →
  33. 5.0.4 22 May 2022
    Release notes
    • improved readme
    • upgraded deps
    Open source →
  34. 5.0.3 04 May 2022
    Release notes
    • updated metadata
    Open source →
  35. 5.0.0 04 Apr 2022
    Release notes
    • [Breaking] all iso code api now use IsoCode enum
    • fix for parseRaw when only country code is present.
    Open source →
  36. 4.2.1 02 Mar 2022
    Release notes
    • make phone number json serializable
    Open source →
  37. 4.2.0 07 Nov 2021
    Release notes
    • Fix incorrect parsing in some cases
      • fix validate length as it was incorrectly validating with pattern
    Open source →
  38. 4.1.0 18 Oct 2021
    Release notes
    • only modify national number to its international version when it is valid
      • resolve issue where phone number were incorrectly parsed if national number started with country code (it happens)
    Open source →
  39. 4.0.1 15 Oct 2021
    Release notes
    • reexport deprecated public api for backward comp
    Open source →
  40. 4.0.0 15 Oct 2021
    Release notes

    This release removes the LightPhoneParser because it was not working perfectly and the cost of maintaining two parsers is too high.

    Removing that parser allowed to revert to a more succint public API, where methods should be accessed solely via the PhoneNumber class.

    PhoneParser, PhoneNumberFormatter and the likes are still exported for backward compatibility but it is advised to switch to PhoneNumber's methods instead

    • [Breaking]: LightPhoneParser has been removed as it was imperfect and added complexity in maintaining two parsers.
    • [Deprecated]: PhoneParser methods have been deprecated in favor of the methods on PhoneNumber class
    Open source →
  41. 4.0.0+1 15 Oct 2021

    Nothing published for this version

  42. 4.0.0+2 15 Oct 2021

    Nothing published for this version

  43. 4.0.0+3 15 Oct 2021

    Nothing published for this version

  44. 4.0.0+4 15 Oct 2021

    Nothing published for this version

  45. 4.0.0+5 15 Oct 2021

    Nothing published for this version

  46. 3.0.2 21 Sep 2021
    Release notes
    • fix formatter error when empty input
    Open source →
  47. 3.0.1 21 Sep 2021
    Release notes
    • added [parseNational]
    Open source →
  48. 3.0.0 19 Sep 2021
    Release notes
    • added localized formatter to format a phone number in an human readable way
    • added PhoneNumberRanges and utility operators on PhoneNumber (thanks @bsutton)
    • renamed [dialCode] to [countryCode] as dialCode was semantically incorrect
    Open source →
  49. 2.0.1 23 Aug 2021
    Release notes
    • rename base class for parsers to BasePhoneParser, as parser was too broad.
    • export BasePhoneParser
    Open source →
  50. 2.0.0 23 Aug 2021
    Release notes
    • Resolve issue #1 where it was possible to significantly increase memory foothprint by importing both parsers. Thanks @xvrh
    • Deplaced validate method from PhoneNumber to PhoneParser and LightPhoneParser to make it more obvious that one is
    • Light parser can now parseWithDialCode and parseRaw, although less accurate than the full parser
    Open source →
  51. 1.0.5 21 Aug 2021
    Release notes
    • Minor doc change
    Open source →
  52. 1.0.4 16 Aug 2021
    Release notes
    • Added metadata property runtime type to toString to make it more obvious when two instances are not equals
    Open source →
  53. 1.0.3 16 Aug 2021
    Release notes
    • Made toString more readable
    Open source →
  54. 1.0.2 16 Aug 2021
    Release notes
    • Add toString to PhoneNumber
    Open source →
  55. 1.0.1 23 Jul 2021
    Release notes
    • validate method on PhoneNumber
    Open source →
  56. 1.0.0 23 Jul 2021
    Release notes
    • There are now two parsers:

      • PhoneParser: Heavy, more accurate and more computationally intensive (relies on pattern matching)
      • LightPhoneParser: Light, somewhat accurate and less computationally intensive (relies on length) If a light validation based on length suffice, LightPhoneParser can be used, assuming you don't import the other parser, that will decrease the library size footprint.

      With this change a few breaking changes had to be made

    • [Breaking]: PhoneNumber creation is now made with parsers:

      before:

      final frPhone = PhoneNumber.fromRaw('+33 655 5705 76');
      final frPhone1 = PhoneNumber.fromIsoCode('FR', '655 5705 76');
      

      after:

      final frPhone = PhoneParser.fromRaw('+33 655 5705 76')
      final frPhone1 = LightPhoneParser.fromIsoCode('FR', '655 5705 76');
      
    • [Breaking]: removed country class and country list, which are now in a separate library

    Open source →
  57. 0.2.0 08 Jun 2021
    Release notes
    • extracted country data files to another library dart_countries as it can be used in other scenarios
    • [Breaking]: Country.getDisplayDialCode is now a getter Country.displayIsoCode.
    Open source →
  58. 0.1.4 03 May 2021
    Release notes
    • upgrade dependencies
    Open source →
  59. 0.1.3 23 Apr 2021
    Release notes
    • deprecate valid property on phone number
    • make phone number type in validate method nullable to validate against general type
    Open source →
  60. 0.1.2 23 Apr 2021
    Release notes
    • rename example so it shows in pub.dev
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive