• ARTICLE
  • STRING
  • CONVERTER
  • ENCRYPT
  • NETWORK
  • MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
  • ARTICLE
    STRING
    CONVERTER
    ENCRYPT
    NETWORK
    MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
logo Online Tools
6 Comments Favorite Copy Link Share

Sequence Generator Online


  • Number
  • Expression
integer of any size
integer of any size
integer of any size, not equal 0
Use prefix 0 to pad numbers to a specified length, 0 is not aligned
the value range is 1 - 100000

Expression Syntax Description

Category Command Parameter Parameter Type Parameter Limitations Parameter Nullable Parameter Desc Command Desc Example Description
string numberStringRand length int ≥1 no specify the length of a numeric string generate a string of random numeric characters of a specified length ${numberStringRand@3} generate a numeric string of length 3, which may start with 0
numberStringRandEx numChar string N/A no the format is 0|1|9 . Specify the number used to generate a random number string generate a random length numeric string composed of specified numbers ${numberStringRandEx@0|1|2|3|9@3@100} generate a numeric string consisting of 0, 1, 2, 3, and 9 with a length between 3 and 100
minLength int ≥1 no minimum length of numeric string
maxLength int ≥minLength no maximum length of numeric string
lowerRand minLength int ≥1 no minimum length of lowercase letter string generate lowercase letter strings of random length ${lowerRand@3@5} generate a string consisting of lowercase letters with a length between 3 and 5
maxLength int ≥minLength no maximum length of lowercase letter string
upperRand minLength int ≥1 no minimum length of uppercase letter string generate random length uppercase letter strings ${upperRand@3@5} generate a string consisting of uppercase letters with a length between 3 and 5
maxLength int ≥minLength no maximum length of uppercase letter string
alphaNumberRand minLength int ≥1 no minimum string length generate a random length string composed of uppercase letters, lowercase letters, and numbers ${alphaNumberRand@3@5} generate a string of uppercase letters, lowercase letters, and numbers with a length between 3 and 5
maxLength int ≥minLength no maximum string length
unicode start int (hex) ≥00 no unicode character minimum codepoint, hexadecimal generate random Unicode characters within the range ${unicode@4E00@9FA5@3@5} generate a string of random Chinese characters with a length between 3 and 5
end int (hex) ≤10FFFF no unicode character maximum codepoint, hexadecimal
minLength int ≥1 no minimum string length
maxLength int ≥minLength no maximum string length
unicodeEx rangeEx string N/A no unicode codepoint expression, can fill in multiple ranges. The supported forms are 00-FF,0256,4E00-9FA5 generate random Unicode characters within the range ${unicode@00-FF,0256,4E00-9FA5@3@5} generate random strings with lengths between 3 and 5, within the range of 00-FF,0256,4E00-9FA5
minLength int ≥1 no minimum string length
maxLength int ≥minLength no maximum string length
select strList string the format is str1|str2|str3 no list of candidate strings randomly select a string from the list of candidate strings ${select@152|137|148|1999} random select 152, 137, 148, 1999
number numberRangeRand min int or float N/A no minimum value of random number, inclusive generate random integers or floating-point numbers within a range ${numberRangeRand@-1.237@3.989@4} generate floating-point numbers greater than or equal to -1.237 and less than 3.989, with 4 digits retained after the decimal point
max int or float >min no maximum value of random number, exclusive
precision int ≥0 no preserve precision after decimal point
numberStep start bigint any size integer no Increment starting integer generate increasing integer numbers ${numberStep@999999999999999999999999@-100@0@16} generate numbers starting from 999999999999999999999999, increasing by -100, not padding, and displaying numbers in hexadecimal
step bigint any size integer no incremental step size
padding int ≥0 no number padding length, 0 is not padding. If pad to the specified length is required, use leading 0 padding
radix int ≥2  
≤36
no numeric base
numberBigintRangeRand min bigint any size integer no minimum value of random number, inclusive generate random integers within a range, supporting integers of unlimited size ${numberBigintRangeRand@-999999@9999999999999999@4@10} generate integers greater than or equal to -999999 and less than 99999999999999. Use 0 alignment for numbers with a length of less than 4 digits, and display the numbers in base 10
max bigint any size integer, >min no maximum value of random number, exclusive
padding int ≥0 no number padding length, 0 is not padding. If pad to the specified length is required, use leading 0 padding
radix int ≥2  
≤36
no numeric base
numberGaussian mean float N/A no mean value generate random numbers that conform to a normal distribution ${numberGaussian@0@1@3} generate a random number with a normal distribution of 0 mean and 1 standard deviation, and retain 3 as a number after the decimal point in the result
stdDev float ≥0 no standard deviation
precision int ≥0 no number after decimal point to be retained
numberGaussianRange mean float >min, <max no mean value generate random numbers within a range that conform to a normal distribution. Note: This command requires the correct setting of each parameter to ensure that the logical relationship of the parameters is correct ${numberGaussianRange@0@0.5@3@-1@1} generate a normal distribution of random numbers with an average of 0, a standard deviation of 0.5, and 3 decimal places, between -1 and 1
stdDev float ≥0 no standard deviation
precision int ≥0 no number after decimal point to be retained
min float N/A no minimum value of random number, inclusive
max float >min no maximum value of random number, exclusive
numberBigfloatRangeRand min floating point number of any size N/A no minimum value of random number, inclusive generate floating-point numbers of any size within the range, with the ability to save any number of digits after the decimal point ${numberBigfloatRangeRand@-1111111111111111111.2222222222@333333333333333333333333333333333333333333333333333333333333.555555@100} random generate floating-point numbers from -1111111111111111111.2222222222 to 333333333333333333333333333333333333333333333333333333333333.555555 , keep 100 digits after decimal point
max floating point number of any size >min no maximum value of random number, exclusive
precision int ≥0 no number after decimal point to be retained
time timeNow format string time format string no time format string generate a formatted string based on the current time ${timeNow@X} generate the current time string, format it as a Unix timestamp, in seconds
timeStep format string time format string no time format string generate an increasing or decreasing time series and format it in the specified time format ${timeStep@YYYY-MM-DD HH:mm@2020-01-01 12:00:00@300000} generate a time string starting from 2020-01-01 12:00:00, with an increment of 5 minutes. The format of the generated time string is YYYY-MM-DD HH:mm
start string the format is 2022-01-03 20:59:59 or 2022-01-03 20:59:59.123 no start time
stepMilli int N/A no time increasing step size, measured in milliseconds, supports positive or negative numbers
timeRand format string time format string no time format string generate random time within the range and format it in the specified format ${timeRand@x@2022-01-01 00:00:00@2023-01-01 00:00:00} randomly generate a time between 2022-01-01 00:00:00 and 2023-01-01 00:00:00, and format it as a Unix timestamp in milliseconds
start string the format is 2022-01-03 20:59:59 or 2022-01-03 20:59:59.123 no start time
end string the format is 2022-01-03 20:59:59 or 2022-01-03 20:59:59.123, ≥start no end time
expression expr exprContent string valid expression statements no expression statement, using expressions to generate fields. The expression supports using \index to reference other fields, such as \1 + \3 indicating the use of the sum of the first and third fields in the template as the value of this field. If the other fields referenced by the expression are of string type, the referenced fields need to be enclosed in single quotes. For example, '\3'. Multiple operators and mathematical functions are supported in expressions, please refer to the Expression Syntax for details. use expressions to generate field values. ${expr@\1 - sqrt(\3) + 100} Subtract the square root of the value of the third field from the value of the first field in the template, and then add 100.
Related Tools
Sequence Generator Online-summary

Generate a string sequence based on numbers or expressions online. This tool supports batch generation of serial no list, or other text sequences with specific rules.

Sequence Generator Online-instructions

The Sequence Generator Online tool supports generation of sequence, or text sequences conforming to specific protocols. The typical use of this tool is to generate serial numbers and generate random text data in batches according to the protocols. Generation supports simple generation of text sequences based on numbers and advanced generation of complex text sequences based on expressions. Expressions support random strings, numbers, floating-point numbers, time, and Unicode characters to participate in text generation.

  1. Number : Use the upper and lower limits of numbers to generate a number sequence, and add an optional prefix or suffix to generate a specific text sequence. It is suitable for simple serial number generation.
  2. Expression : Generate text sequences using supported expression syntax. It is suitable for complex text data generation. For expression syntax, refer to the above syntax description. The expression you fill in must be completely correct.
  3. The download file encoding is UTF-8 .
  4. Time Format Documentation
    Format Output Description
    YY 18 Two-digit year
    YYYY 2018 Four-digit year
    M 1-12 The month, beginning at 1
    MM 01-12 The month, 2-digits
    MMM Jan-Dec The abbreviated month name
    MMMM January-December The full month name
    D 1-31 The day of the month
    DD 01-31 The day of the month, 2-digits
    d 0-6 The day of the week, with Sunday as 0
    dd Su-Sa The min name of the day of the week
    ddd Sun-Sat The short name of the day of the week
    dddd Sunday-Saturday The name of the day of the week
    H 0-23 The hour
    HH 00-23 The hour, 2-digits
    h 1-12 The hour, 12-hour clock
    hh 01-12 The hour, 12-hour clock, 2-digits
    m 0-59 The minute
    mm 00-59 The minute, 2-digits
    s 0-59 The second
    ss 00-59 The second, 2-digits
    SSS 000-999 The millisecond, 3-digits
    Z +05:00 The offset from UTC, ±HH:mm
    ZZ +0500 The offset from UTC, ±HHmm
    A AM PM
    a am pm
    Q 1-4 Quarter
    Do 1st 2nd ... 31st Day of Month with ordinal
    k 1-24 The hour, beginning at 1
    kk 01-24 The hour, 2-digits, beginning at 1
    X 1360013296 Unix Timestamp in second
    x 1360013296123 Unix Timestamp in millisecond
  5. Expression Syntax Documentation
    1. Basic Explanation
      1. Reference other fields of the template in the expression, with the starting index number 1.
      2. If the expression uses \index to reference other field values in the template, the implementation method is to directly replace the value of the field with the position where the reference appears. Understanding this is very important.
        1. If the field value referenced by the \index is a string value, it needs to be enclosed in single quotation marks or double quotation marks. If a single quotation mark or double quotation marks appears in the string value, it needs to be escaped, otherwise the statement is not a valid expression statement.
        2. For numerical field references, in some cases (when the operator priority of the field is higher than the unary negative operator), it is necessary to wrap the field with parentheses to increase the priority when the field value is negative. For example, when the expression \1^2 refers to the \1 field and the value of the field is -5, the calculation result is -25, which is incorrect and unexpected. This is because the statement after replacing the expression is -5^2, and the ^ operator has a higher priority than -. To obtain the correct result at this point, the expression needs to be modified to(\1)^2.
      3. In addition to the operators and functions listed below, JavaScript's built-in Math object, JSON object, parseInt method, and parseFloat method can also be used in expressions. For example, the expression Math.trunc(\1) truncates the value of field 1 to an integer.
    2. Operators
      Operator Name Syntax Associativity Example Result
      (, ) Grouping (x) None 2 * (3 + 4) 14
      [, ] Matrix, Index [...] None [[1,2],[3,4]] [[1,2],[3,4]]
      {, } Object {...} None {a: 1, b: 2} (This tool does not support this operator) {a: 1, b: 2}
      , Parameter separator x, y Left to right max(2, 1, 5) 5
      . Property accessor obj.prop Left to right obj={a: 12}; obj.a 12
      ; Statement separator x; y Left to right a=2; b=3; a*b [6]
      ; Row separator [x; y] Left to right [1,2;3,4] [[1,2],[3,4]]
      \n Statement separator x \n y Left to right a=2 \n b=3 \n a*b [2,3,6]
      + Add x + y Left to right 4 + 5 9
      + Unary plus +y Right to left +4 4
      - Subtract x - y Left to right 7 - 3 4
      - Unary minus -y Right to left -4 -4
      * Multiply x * y Left to right 2 * 3 6
      .* Element-wise multiply x .* y Left to right [1,2,3] .* [1,2,3] [1,4,9]
      / Divide x / y Left to right 6 / 2 3
      ./ Element-wise divide x ./ y Left to right [9,6,4] ./ [3,2,2] [3,3,2]
      % Percentage x% None 8% 0.08
      % Addition with Percentage x + y% Left to right 100 + 3% 103
      % Subtraction with Percentage x - y% Left to right 100 - 3% 97
      % mod Modulus x % y Left to right 8 % 3 2
      ^ Power x ^ y Right to left 2 ^ 3 8
      .^ Element-wise power x .^ y Right to left [2,3] .^ [3,3] [8,27]
      ' Transpose y' Left to right [[1,2],[3,4]]' [[1,3],[2,4]]
      ! Factorial y! Left to right 5! 120
      & Bitwise and x & y Left to right 5 & 3 1
      ~ Bitwise not ~x Right to left ~2 -3
      | Bitwise or x | y Left to right 5 | 3 7
      ^| Bitwise xor x ^| y Left to right 5 ^| 2 7
      << Left shift x << y Left to right 4 << 1 8
      >> Right arithmetic shift x >> y Left to right 8 >> 1 4
      >>> Right logical shift x >>> y Left to right -8 >>> 1 2147483644
      and Logical and x and y Left to right true and false false
      not Logical not not y Right to left not true false
      or Logical or x or y Left to right true or false true
      xor Logical xor x xor y Left to right true xor true false
      = Assignment x = y Right to left a = 5 5
      ? : Conditional expression x ? y : z Right to left 15 > 100 ? 1 : -1 -1
      : Range x : y Right to left 1:4 [1,2,3,4]
      to, in Unit conversion x to y Left to right 2 inch to cm 5.08 cm
      == Equal x == y Left to right 2 == 4 - 2 true
      != Unequal x != y Left to right 2 != 3 true
      < Smaller x < y Left to right 2 < 3 true
      > Larger x > y Left to right 2 > 3 false
      <= Smallereq x <= y Left to right 4 <= 3 false
      >= Largereq x >= y Left to right 2 + 4 >= 6 true
    3. Precedence
      The operators have the following precedence, from highest to lowest:
      Operators Description
      (...)
      [...]
      {...}
      Grouping
      Matrix
      Object
      x(...)
      x[...]
      obj.prop
      :
      Function call
      Matrix index
      Property accessor
      Key/value separator
      ' Matrix transpose
      ! Factorial
      ^, .^ Exponentiation
      +, -, ~, not Unary plus, unary minus, bitwise not, logical not
      %, mod percentage, modulus
      See section below Implicit multiplication
      *, /, .*, ./ Multiply, divide
      +, - Add, subtract
      : Range
      to, in Unit conversion
      <<, >>, >>> Bitwise left shift, bitwise right arithmetic shift, bitwise right logical shift
      ==, !=, <, >, <=, >= Relational
      & Bitwise and (lazily evaluated)
      ^| Bitwise xor
      | Bitwise or (lazily evaluated)
      and Logical and (lazily evaluated)
      xor Logical xor
      or Logical or (lazily evaluated)
      ?, : Conditional expression
      = Assignment
      , Parameter and column separator
      ; Row separator
      \n, ; Statement separators
    4. Functions
      When using a function in an expression, omit math. and use the function name directly. For example, abs(3).
      Function Description
      math.abs(x) Calculate the absolute value of a number.
      math.add(x, y) Add two or more values, x + y.
      math.cbrt(x [, allRoots]) Calculate the cubic root of a value.
      math.ceil(x) Round a value towards plus infinity If x is complex, both real and imaginary part are rounded towards plus infinity.
      math.cube(x) Compute the cube of a value, x * x * x.
      math.divide(x, y) Divide two values, x / y.
      math.dotDivide(x, y) Divide two matrices element wise.
      math.dotMultiply(x, y) Multiply two matrices element wise.
      math.dotPow(x, y) Calculates the power of x to y element wise.
      math.exp(x) Calculate the exponential of a value.
      math.expm1(x) Calculate the value of subtracting 1 from the exponential value.
      math.fix(x) Round a value towards zero.
      math.floor(x) Round a value towards minus infinity.
      math.gcd(a, b) Calculate the greatest common divisor for two or more values or arrays.
      math.hypot(a, b, …) Calculate the hypotenuse of a list with values.
      math.invmod(a, b) Calculate the (modular) multiplicative inverse of a modulo b.
      math.lcm(a, b) Calculate the least common multiple for two or more values or arrays.
      math.log(x [, base]) Calculate the logarithm of a value.
      math.log10(x) Calculate the 10-base logarithm of a value.
      math.log1p(x) Calculate the logarithm of a value+1.
      math.log2(x) Calculate the 2-base of a value.
      math.mod(x, y) Calculates the modulus, the remainder of an integer division.
      math.multiply(x, y) Multiply two or more values, x * y.
      math.norm(x [, p]) Calculate the norm of a number, vector or matrix.
      math.nthRoot(a) Calculate the nth root of a value.
      math.nthRoots(x) Calculate the nth roots of a value.
      math.pow(x, y) Calculates the power of x to y, x ^ y.
      math.round(x [, n]) Round a value towards the nearest rounded value.
      math.sign(x) Compute the sign of a value.
      math.sqrt(x) Calculate the square root of a value.
      math.square(x) Compute the square of a value, x * x.
      math.subtract(x, y) Subtract two values, x - y.
      math.unaryMinus(x) Inverse the sign of a value, apply a unary minus operation.
      math.unaryPlus(x) Unary plus operation.
      math.xgcd(a, b) Calculate the extended greatest common divisor for two values.
      math.combinations(n, k) Compute the number of ways of picking k unordered outcomes from n possibilities.
      math.combinationsWithRep(n, k) Compute the number of ways of picking k unordered outcomes from n possibilities, allowing individual outcomes to be repeated more than once.
      math.factorial(n) Compute the factorial of a value Factorial only supports an integer value as argument.
      math.gamma(n) Compute the gamma function of a value using Lanczos approximation for small values, and an extended Stirling approximation for large values.
      math.kldivergence(x, y) Calculate the Kullback-Leibler (KL) divergence between two distributions.
      math.lgamma(n) Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.
      math.multinomial(a) Multinomial Coefficients compute the number of ways of picking a1, a2, .
      math.permutations(n [, k]) Compute the number of ways of obtaining an ordered subset of k elements from a set of n elements.
      math.pickRandom(array) Random pick one or more values from a one dimensional array.
      math.random([min, max]) Return a random number larger or equal to min and smaller than max using a uniform distribution.
      math.randomInt([min, max]) Return a random integer number larger or equal to min and smaller than max using a uniform distribution.
      math.corr(A, B) Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.
      math.cumsum(a, b, c, …) Compute the cumulative sum of a matrix or a list with values.
      math.mad(a, b, c, …) Compute the median absolute deviation of a matrix or a list with values.
      math.max(a, b, c, …) Compute the maximum value of a matrix or a list with values.
      math.mean(a, b, c, …) Compute the mean value of matrix or a list with values.
      math.median(a, b, c, …) Compute the median of a matrix or a list with values.
      math.min(a, b, c, …) Compute the minimum value of a matrix or a list of values.
      math.mode(a, b, c, …) Computes the mode of a set of numbers or a list with values(numbers or characters).
      math.prod(a, b, c, …) Compute the product of a matrix or a list with values.
      math.quantileSeq(A, prob[, sorted]) Compute the prob order quantile of a matrix or a list with values.
      math.std(a, b, c, …) Compute the standard deviation of a matrix or a list with values.
      math.sum(a, b, c, …) Compute the sum of a matrix or a list with values.
      math.variance(a, b, c, …) Compute the variance of a matrix or a list with values.
      math.bin(value) Format a number as binary.
      math.format(value [, precision]) Format a value of any type into a string.
      math.hex(value) Format a number as hexadecimal.
      math.oct(value) Format a number as octal.
      math.print(template, values [, precision]) Interpolate values into a string template.
      math.acos(x) Calculate the inverse cosine of a value.
      math.acosh(x) Calculate the hyperbolic arccos of a value, defined as acosh(x) = ln(sqrt(x^2 - 1) + x).
      math.acot(x) Calculate the inverse cotangent of a value, defined as acot(x) = atan(1/x).
      math.acoth(x) Calculate the inverse hyperbolic tangent of a value, defined as acoth(x) = atanh(1/x) = (ln((x+1)/x) + ln(x/(x-1))) / 2.
      math.acsc(x) Calculate the inverse cosecant of a value, defined as acsc(x) = asin(1/x).
      math.acsch(x) Calculate the inverse hyperbolic cosecant of a value, defined as acsch(x) = asinh(1/x) = ln(1/x + sqrt(1/x^2 + 1)).
      math.asec(x) Calculate the inverse secant of a value.
      math.asech(x) Calculate the hyperbolic arcsecant of a value, defined as asech(x) = acosh(1/x) = ln(sqrt(1/x^2 - 1) + 1/x).
      math.asin(x) Calculate the inverse sine of a value.
      math.asinh(x) Calculate the hyperbolic arcsine of a value, defined as asinh(x) = ln(x + sqrt(x^2 + 1)).
      math.atan(x) Calculate the inverse tangent of a value.
      math.atan2(y, x) Calculate the inverse tangent function with two arguments, y/x.
      math.atanh(x) Calculate the hyperbolic arctangent of a value, defined as atanh(x) = ln((1 + x)/(1 - x)) / 2.
      math.cos(x) Calculate the cosine of a value.
      math.cosh(x) Calculate the hyperbolic cosine of a value, defined as cosh(x) = 1/2 * (exp(x) + exp(-x)).
      math.cot(x) Calculate the cotangent of a value.
      math.coth(x) Calculate the hyperbolic cotangent of a value, defined as coth(x) = 1 / tanh(x).
      math.csc(x) Calculate the cosecant of a value, defined as csc(x) = 1/sin(x).
      math.csch(x) Calculate the hyperbolic cosecant of a value, defined as csch(x) = 1 / sinh(x).
      math.sec(x) Calculate the secant of a value, defined as sec(x) = 1/cos(x).
      math.sech(x) Calculate the hyperbolic secant of a value, defined as sech(x) = 1 / cosh(x).
      math.sin(x) Calculate the sine of a value.
      math.sinh(x) Calculate the hyperbolic sine of a value, defined as sinh(x) = 1/2 * (exp(x) - exp(-x)).
      math.tan(x) Calculate the tangent of a value.
      math.tanh(x) Calculate the hyperbolic tangent of a value, defined as tanh(x) = (exp(2 * x) - 1) / (exp(2 * x) + 1).
    5. Constants
      Constant Description Value
      e, E Euler’s number, the base of the natural logarithm. 2.718281828459045
      i Imaginary unit, defined as i * i = -1. A complex number is described as a + b * i, where a is the real part, and b is the imaginary part. sqrt(-1)
      Infinity Infinity, a number which is larger than the maximum number that can be handled by a floating point number. Infinity
      LN2 Returns the natural logarithm of 2. 0.6931471805599453
      LN10 Returns the natural logarithm of 10. 2.302585092994046
      LOG2E Returns the base-2 logarithm of E. 1.4426950408889634
      LOG10E Returns the base-10 logarithm of E. 0.4342944819032518
      NaN Not a number. NaN
      null Value null. null
      phi Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as (1 + sqrt(5)) / 2 1.618033988749895
      pi, PI The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter. 3.141592653589793
      SQRT1_2 Returns the square root of 1/2. 0.7071067811865476
      SQRT2 Returns the square root of 2. 1.4142135623730951
      tau Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi. 6.283185307179586
      undefined An undefined value. Preferably, use null to indicate undefined values. undefined
      version Returns the version number of math.js. For example 0.24.1
    6. For more documentation about expression syntax, please refer to the Link.