Free tool Mini program path generator for WeChat and Alipay
A mini program page path such as pages/goods/detail?id=1024 ends up in QR codes, share cards, official account menus, SMS links and ads. Each place has its own rules: a 32-character scene for unlimited codes, no query in the path of a URL Scheme, URL-encoded parameters for Alipay. Enter the page and parameters once and get every format, checked against the official limits.
- Official length limits checked
- URL Scheme, URL Link, alipays://
- Runs locally
Build a page path with parameters
The path, links and request bodies update as you type. Parameters are UTF-8 percent-encoded, so Chinese and spaces are safe.
Douyin builds its links through server APIs and is not covered here.
WeChat: wx plus 16 characters. Alipay: 16 digits. Used in the scheme links; leave empty to see the format with a placeholder.
As written in app.json, for example pages/goods/detail. A leading / is removed; a pasted ?query is moved into the parameters.
One key=value per line, or joined with &. Values can be typed as they are; they are encoded for you.
Where the entrance is: poster, sms, store021.
Type of channel: offline, sms, social.
The campaign name, for example spring_sale.
To tell versions apart: table_card, window.
At most 32 characters. Leave empty to use the parameters above (without utm). Put a short ID here when the full set does not fit.
Only for codes and links opened outside WeChat; the published version is the default.
pages/goods/detail?id=1024&utm_source=poster&utm_medium=offline&utm_campaign=spring_saleFor getQRCode (up to 1024 characters), share cards (onShareAppMessage path), official account menus and navigateToMiniProgram.
weixin://dl/business/?appid=wx0000000000000000&path=pages/goods/detail&query=id%3D1024%26utm_source%3Dposter%26utm_medium%3Doffline%26utm_campaign%3Dspring_saleWeChat: plain-text URL Scheme (scene 1286). The mini program must first enable “open with plain-text scheme” in the admin console. Alipay: alipays:// scheme.
The scheme wrapped in https://ds.alipay.com/?scheme=, for web pages and SMS.
id=1024
// Reading it in the page (when opened from an API B code)
Page({
onLoad(query) {
const scene = decodeURIComponent(query.scene || '');
},
});The value for getUnlimitedQRCode, and how to read it in the page.
// Mini program code · API B (unlimited count)
POST https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=ACCESS_TOKEN
{"page":"pages/goods/detail","scene":"id=1024","check_path":true,"env_version":"release"}
// Mini program code · API A (100,000 codes shared with API C)
POST https://api.weixin.qq.com/wxa/getwxacode?access_token=ACCESS_TOKEN
{"path":"pages/goods/detail?id=1024&utm_source=poster&utm_medium=offline&utm_campaign=spring_sale","env_version":"release"}
// Encrypted URL Link (returns https://wxaurl.cn/…)
POST https://api.weixin.qq.com/wxa/generate_urllink?access_token=ACCESS_TOKEN
{"path":"pages/goods/detail","query":"id=1024&utm_source=poster&utm_medium=offline&utm_campaign=spring_sale","env_version":"release"}
// Encrypted URL Scheme (returns weixin://dl/business/?t=…)
POST https://api.weixin.qq.com/wxa/generatescheme?access_token=ACCESS_TOKEN
{"jump_wxa":{"path":"pages/goods/detail","query":"id=1024&utm_source=poster&utm_medium=offline&utm_campaign=spring_sale","env_version":"release"}}Send from your server with an access_token. URL Link and encrypted URL Scheme take the path without a query and the query separately.
Checks
- NoteNo AppID: the scheme link shows a placeholder.
- OKscene is 7 / 32 characters and uses only allowed characters.
- Notescene was built from your parameters (utm left out). Codes from getUnlimitedQRCode open the page without the path query, so everything the page needs must be in scene.
Parameters
| Key | Value | Encoded | Type |
|---|---|---|---|
id | 1024 | id=1024 | custom |
utm_source | poster | utm_source=poster | utm |
utm_medium | offline | utm_medium=offline | utm |
utm_campaign | spring_sale | utm_campaign=spring_sale | utm |
Share these inputs: the values go after the # in the link, so they never reach a server.
https://tapcub.com/tools/mini-program-path-generator
Version v1.0Updated Update history
Which output goes where
Every output opens the same page with the same parameters; they differ in where they can be used and in their limits.
Page path with parameters
Used inside WeChat: share cards, official account menus and articles, navigateToMiniProgram, and getQRCode / createQRCode codes, whose limits are 1024 and 128 characters. The parameters arrive in the page’s onLoad(query).
scene
For getUnlimitedQRCode, the API without a quantity cap. The page path cannot carry a query there; only up to 32 characters of scene arrive, as query.scene, and must be decoded with decodeURIComponent.
Scheme link
WeChat plain-text URL Scheme: weixin://dl/business/?appid=…&path=…&query=…, built without calling an API once the mini program has declared it. iOS recognises it in SMS; on Android it has to be opened from a web page. Alipay: alipays://platformapi/startapp.
Server API bodies
Encrypted URL Scheme and URL Link are generated by WeChat’s server APIs (published mini programs, non-individual accounts only). The bodies here are ready to send once you add an access_token.
Values with Chinese characters stay percent-encoded in the link. If a page receives them still encoded, decode them with decodeURIComponent before use.
Three steps
Test each link or code on a phone before printing or sending it.
-
1
Enter the page
Copy the page path from
app.jsonand pick the platform. Add the AppID if you need the scheme link. -
2
Add parameters
Business parameters (product ID, store number) one per line, then the utm_* fields for the campaign. Keep IDs short if they must fit in a 32-character scene.
-
3
Copy the format you need
Path for share cards and limited codes, scene for unlimited codes, scheme or API body for SMS and web pages. Fix anything marked Error first.
Limits from the official documentation
Checked against WeChat and Alipay documentation on 2026-11-10. Daily quotas change more often than formats, so check the console for current numbers.
- Encoding: keys and values are UTF-8 percent-encoded (
encodeURIComponent); a space becomes%20, 海报 becomes%E6%B5%B7%E6%8A%A5 - WeChat scene and query character set: digits, letters and
!#$&'()*+,/:;=?@-._~; scene does not allow%, query values must be URL-encoded - WeChat URL Scheme / URL Link: the path must be a page of the published mini program and cannot carry a query; the query is passed separately
- Alipay:
alipays://platformapi/startapp?appId=…&page=…&query=…; the parameters after?in page and the whole query must be URL-encoded, or only the first parameter arrives
| Format | Where the parameters go | Limit | Scene value |
|---|---|---|---|
| getUnlimitedQRCode | scene (page without query) | scene ≤ 32 characters, no % | 1047 / 1048 / 1049 |
| getQRCode | path query | path ≤ 1024 characters | 1047 / 1048 / 1049 |
| createQRCode | path query | path ≤ 128 characters | 1011 / 1012 / 1013 |
| Plain-text URL Scheme | query= (encoded) | query ≤ 512 characters | 1286 |
| Encrypted URL Scheme | API query, or cq appended | query ≤ 1024, cq ≤ 256 | 1065 |
| URL Link | API query, or cq appended | query ≤ 1024, cq ≤ 256 | 1194 (1167 inside WeChat) |
One product page, three entrances
A shop promotes product 1024 on store posters, in an SMS and in customer groups. Same page, different formats.
| Entrance | Format | What goes in |
|---|---|---|
| Store poster (20 stores) | getUnlimitedQRCode | page pages/goods/detail, scene id=1024&s=21 (13 characters; store 21) |
| SMS | URL Link or plain-text URL Scheme | query id=1024&utm_source=sms&utm_campaign=spring_sale |
| Customer group share | Share card path | pages/goods/detail?id=1024&utm_source=group |
The full utm set does not fit in 32 characters, so the poster codes carry a store number and the page maps it to a campaign. The scene values (1047, 1194, 1008) then confirm which doorway each visit used.
Why mini program links lose their parameters
Almost every case comes down to encoding or to using the wrong field.
Unencoded & in a nested query
In a scheme, query=a=1&b=2 is read as two scheme parameters and b is lost. Encode the whole query: query=a%3D1%26b%3D2.
Putting a query in the unlimited-code page
getUnlimitedQRCode rejects a page with parameters. Parameters go in scene, and the page reads query.scene.
Chinese in scene
scene does not accept %, so encoded Chinese cannot be used. Use an ID and look the details up on your server.
Same parameter name as the SDK
TapCub’s mini program SDK uses tc_sd, tc_sdp and tc_sfp in share paths (withShareParams()). Your own parameters should use other names.
Parameters and scene values in the same report
The TapCub mini program SDK records the scene value and the launch query on every launch, so each code and link can be counted on its own.
Offline codes tracked separately
Give every mini program code its own parameter and store posters, table cards and parcel inserts each count on their own.
Learn moreShare chains in one call
Wrap the share path with the SDK’s withShareParams() and return opens, the sharing page and viral depth are counted for you.
From the landing page onward
Paths start from the page your link opened and show whether the campaign page sends people into products.
Learn moreMini program path questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
How do I pass parameters to a mini program page?
Append them as a query: pages/goods/detail?id=1024&from=poster. The page reads them in onLoad(query). Encode values that contain Chinese, spaces or &.
What is the scene parameter limit for getUnlimitedQRCode?
At most 32 visible characters: digits, letters and !#$&'()*+,/:;=?@-._~. % is not allowed, so Chinese cannot be URL-encoded into it. The page must not carry a query; read decodeURIComponent(query.scene) in the page.
What is the difference between URL Scheme and URL Link?
Both open a WeChat mini program from outside WeChat. A URL Scheme looks like weixin://dl/business/?t=… (encrypted) or ?appid=…&path=… (plain text); a URL Link is an https link (https://wxaurl.cn/…) that also works in web pages and inside WeChat. Encrypted schemes and URL Links come from server APIs; the plain-text scheme is built by hand after declaring it in the admin console.
Why does my plain-text URL Scheme not open?
The mini program must enable “open with plain-text scheme” in its account settings, the path must be a page of the published version without a query, and the query must be URL-encoded and at most 512 characters. On Android the scheme has to be opened from a web page; it is not recognised in SMS.
How do I build an Alipay mini program link?
alipays://platformapi/startapp?appId=<AppID>&page=<path>&query=<launch parameters>, with the parameters after ? in page and the whole query URL-encoded. For web pages and SMS, encode the scheme again and append it to https://ds.alipay.com/?scheme=.
Should I add utm parameters to mini program paths?
If you report by campaign, yes: TapCub’s tagged links table groups by utm_source and utm_campaign, independent of the scene value. Keep them out of a 32-character scene and map a short ID instead.
Is anything I type uploaded?
No. Paths, links and request bodies are built in your browser. The share link keeps the inputs after # in the URL, which browsers do not send to servers.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
See which code and which link brought people in
TapCub reads the scene value and the parameters from each launch, and puts mini program users next to your website and app users.