# url2form.js

> Fill a form with the current url queries

Latest version **2.2.1** (published 2025-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install url2form.js
pnpm add url2form.js
yarn add url2form.js
bun add url2form.js
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2025-10-23 |
| First published | 2015-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Thomas ZILLIOX |
| Maintainers | tzi |
| Keywords | form, url, query |

## Links

- npm: https://www.npmjs.com/package/url2form.js
- Repository: https://github.com/tzi/url2form.js
- Homepage: https://github.com/tzi/url2form.js#readme
- Issues: https://github.com/tzi/url2form.js/issues
- npm.io page: https://npm.io/package/url2form.js

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.2.1 (latest) — 2025-10-23
- 2.2.0 — 2025-10-23
- 2.1.1 — 2015-09-24
- 2.1.0 — 2015-09-24
- 2.0.1 — 2015-09-24
- 2.0.0 — 2015-09-08
- 1.0.0 — 2015-09-04

## README

url2form.js
==============

A JavaScript library to fill a form with the current url queries.

It allows you to create JavaScript application with sharable states without having a back-end.
Start filling your form, validate, bookmark the generated URL, and you'll be able to go back to this specific state later.



Quick start
--------------

```sh
npm install url2form.js
```

```html
<form name="myFormName">
  <input type="text" name="myInput" value="" />
  <button>Validate</button>
</form>

<script>
  url2form.init('myFormName');
</script>
```

If the URI is "?myInput=myValue" the `input` will be valued with "myValue".
Every time you click on validate, you create a new URL to bookmark.



Projects using it
-------

 * [Pajomatic](http://tut-tuuut.github.io/pajomatic/): Help for French parents who pay a nanny



How to Contribute
--------

1. [Star](https://github.com/tzi/url2form.js/stargazers) the project!
2. [Report a bug](https://github.com/tzi/url2form.js/issues/new) that you have found.
3. Tweet and blog about `url2form.js` and [Let me know](https://twitter.com/iamtzi) about it.
4. [Pull requests](CONTRIBUTING.md) are also highly appreciated.



Author & Community
--------

`url2form.js` is under [MIT License](http://opensource.org/licenses/MIT).<br>
It was created & is maintained by [Thomas ZILLIOX](http://tzi.fr).

---
_Source: https://npm.io/package/url2form.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
