// Simple predicates
'tacocat'.startsWith('taco')

// Parameterized predicates over structured data
account.balance >= transaction.withdrawal

// JSON objects
{'sub': '12345678',
 'aud': 'example2.cel.dev',
 'iss': 'https://example1.cel.dev/jwt-issuer'}

// Strongly typed objects
common.GeoPoint{ latitude: 10.0, longitude: -5.5 }

Common Expression Language (CEL) is an expression language that’s fast, portable, and safe to execute in performance-critical applications. CEL is designed to be embedded in an application, with application-specific extensions, and is ideal for extending declarative configurations that your applications might already use.

Use CEL for things like list filters for API calls, validation constraints on protocol buffers, and authorization rules for API requests.

Accelerated expression evaluation in performance-critical paths from nanoseconds to microseconds.
Developer friendly, light weight with common syntax across multiple Google and external systems.
Supports subsetting and extension, easy to embed and tailor to configuration and policy requirements.
Non-Turing complete, and only accesses data provided by the host application.

CEL is ideal for performance-critical applications because it was designed to evaluate safely and quickly (nanoseconds to microseconds) with predictible costs. CEL expressions are especially useful for predicate logic and simple data transformations.

CEL is used most efficiently in applications where expressions are evaluated frequently, but modified infrequently. For example, evaluating an HTTP request against a security policy is an excellent use case for CEL. A CEL security policy expression would have a one-time configuration cost for validating the expression and then be evaluated very frequently at a negligible cost.

Still not sure? Check out the CEL overview and language definition, or just ask us! We're happy to help.

Want to help the CEL project? Contribute to our open source code and documentation. We'd love your help!