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 2026Releases
latest 60 of 67-
9.0.2501 Aug 2026Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.2401 Jul 2026Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.2301 Jun 2026Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.2201 May 2026Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.2101 Apr 2026Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.2001 Mar 2026Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.1901 Feb 2026Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.1801 Jan 2026Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.1701 Dec 2025Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.1601 Nov 2025Release notes
Open source →Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
9.0.1501 Oct 2025 -
9.0.1125 Aug 2025Nothing published for this version
-
9.0.302 Dec 2024 -
9.0.210 Nov 2024 -
9.0.130 Sep 2024 -
9.0.006 Sep 2024Release notes
Open source →- Added a format parameter to choose between international and national format
- Format now uses the national format by default
-
8.3.029 May 2024 -
8.2.221 May 2024 -
8.2.128 Feb 2024 -
8.2.028 Feb 2024Release notes
Open source →- added VOIP support
- udpated metadata
- Removed
MinMaxUtilsthat was unused internally. While exported publically it was undocumented.
-
8.1.304 Feb 2024 -
8.1.202 Feb 2024 -
8.1.102 Feb 2024 -
8.1.007 Dec 2023Release notes
Open source →- 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
-
8.0.023 Jun 2023Release notes
Open source →- 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
-
7.0.219 Feb 2023Release notes
Open source →- Changed behavior to not remove the country code from an incomplete phone number that did not start with an exit code.
-
7.0.119 Feb 2023Release notes
Open source →- Fix issue where international phone numbers would be transformed as if those were local ones.
-
7.0.010 Aug 2022Release notes
Open source →This major introduces a more accurate parsing logic taking into account caller and destination country.
- add
parsemethod which takes as parameterscallerCountryanddestinationCountry - [Breaking]: removed most factory methods on
PhoneNumberin favor ofparse, see readme - [Breaking]: renamed
validateandvalidateWithLengthtoisValidandisValidateLength - updated metadata
- PhoneNumber.findPotentialPhoneNumbers now returns a list of phone number when scanning text.
- add
-
7.0.0+123 Sep 2022Nothing published for this version
-
6.0.110 Aug 2022 withdrawnRelease notes
Open source →- please use 6.0.0 or upgrade to 7.0.0, this is a faulty version.
- deprecated factories
-
6.0.025 Jul 2022Release notes
Open source →- [Breaking]: removed fromMap, toMap which have been replaced by fromJson(Map), toJson respectively.
-
5.0.522 May 2022 -
5.0.422 May 2022 -
5.0.304 May 2022 -
5.0.004 Apr 2022Release notes
Open source →- [Breaking] all iso code api now use IsoCode enum
- fix for parseRaw when only country code is present.
-
4.2.102 Mar 2022 -
4.2.007 Nov 2021Release notes
Open source →- Fix incorrect parsing in some cases
- fix validate length as it was incorrectly validating with pattern
- Fix incorrect parsing in some cases
-
4.1.018 Oct 2021Release notes
Open source →- 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)
- only modify national number to its international version when it is valid
-
4.0.115 Oct 2021 -
4.0.015 Oct 2021Release notes
Open source →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
-
4.0.0+115 Oct 2021Nothing published for this version
-
4.0.0+215 Oct 2021Nothing published for this version
-
4.0.0+315 Oct 2021Nothing published for this version
-
4.0.0+415 Oct 2021Nothing published for this version
-
4.0.0+515 Oct 2021Nothing published for this version
-
3.0.221 Sep 2021 -
3.0.121 Sep 2021 -
3.0.019 Sep 2021Release notes
Open source →- 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
-
2.0.123 Aug 2021Release notes
Open source →- rename base class for parsers to BasePhoneParser, as parser was too broad.
- export BasePhoneParser
-
2.0.023 Aug 2021Release notes
Open source →- 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
-
1.0.521 Aug 2021 -
1.0.416 Aug 2021Release notes
Open source →- Added metadata property runtime type to toString to make it more obvious when two instances are not equals
-
1.0.316 Aug 2021 -
1.0.216 Aug 2021 -
1.0.123 Jul 2021 -
1.0.023 Jul 2021Release notes
Open source →-
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
-
-
0.2.008 Jun 2021Release notes
Open source →- 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.
-
0.1.403 May 2021 -
0.1.323 Apr 2021Release notes
Open source →- deprecate valid property on phone number
- make phone number type in validate method nullable to validate against general type
-
0.1.223 Apr 2021