You'll receive

Bi-weekly updates

Exclusive discounts

Product update alerts

Format SQL with over 160 options
Qualify objects and expand wildcards
Encapsulate SQL into procedures
Add surrogate keys
Replace one-to-many relationships
Change procedure parameters
Safely rename SQL objects
Locate & highlight unused variables
Format SQL objects
Obfuscate SQL


Advanced SQL formatting

SQL code formatter with over 160 customizable options

See next feature

Impact analysis

Preview the impact of changes with difference highlighting

See next feature

Formatting profiles

Save and quickly toggle between different sets of formatting settings

See next feature

Batch formatting of SQL objects

Allows the formatting of all script based objects e.g. stored procedures, in a database, quickly and easily. Learn more

See next feature

Batch SQL scripts formatting

Format SQL scripts and script folders in batches

See next feature


Make SQL code less readable

See next feature

Wildcard expansion

Transform * wildcards into explicit lists of column names. Learn more

See next feature

Object name qualifying

Qualify columns with schema table names and schema or aliases. Learn more

See next feature

Find unused variables and parameters

Clean up your code by identifying and removing parameters and variables that aren’t used. Learn more

See next feature

Safe rename

Rename tables, procedures, views, functions and columns risk-free. Learn more

See next feature

Add surrogate key

Replace complex, multi-column primary keys with a single column surrogate key. Learn more

See next feature

Replace one-to-many relationships

Add a new associative table to replace one-to-many relationships. Learn more

See next feature

Change parameters

Add, remove or change parameters without breaking dependencies from referencing objects. Learn more

See next feature

Encapsulate SQL

Convert blocks of SQL code into scalar or table functions, stored procedures and views. Automatically identify and create the input parameters. Learn more

See next feature

Split table

Improve your database design and make large tables more manageable by partitioning them. Learn more

See next feature

Copy SQL code as

Render T-SQL into its Java, C#, C++, VB .NET, PHP, Ruby, Delphi or PowerBuilder equivalent. Learn more

See next feature

ApexSQL Refactor – Overview

This knowledgebase article briefly explains every feature/option in ApexSQL Refactor

How to format SQL like a pro – formatting to implicit Microsoft standards and guidance

In this article, we describe how to implement MSDN, SQL Server online documentation, and Adventure Works formatting standards with ApexSQL Refactor

Rules of SQL formatting – Nesting and indenting SQL statements

This article explains nesting and indenting of SQL statements as another aspect of SQL formatting style

Tips and tricks for using ApexSQL Refactor SQL formatting options – General options, Capitalization and Comments

This article provides an explanation of ApexSQL Refactor T-SQL code formatting options in the Formatting, the Capitalization, and the Comments tab

Tips and tricks for using ApexSQL Refactor SQL formatting options – Parameters, Columns, Joins, and Flow control

This article provides an explanation of ApexSQL Refactor T-SQL code formatting options under the Parameters, the Statements, the Joins, and the Flow control tabs

How to customize SQL formatting profiles

This article describes how to use ApexSQL Refactor formatting profiles and is a guidance through the process of managing profiles

How to format all SQL objects in your database

This article shows how to format all SQL objects in a database with the specified formatting profile, without having to script them first

Quickly convert SQL code to language-specific client code

This article describes how to use ApexSQL Refactor convert your T-SQL script into a client language-specific syntax – Java, VB.NET, c#, Perl, PHP, Delphi, PowerBuilder, Ruby, C++, or other custom languages

SQL database refactoring – introduction

This article explains what database refactoring is and what are the reasons for database refactoring

How to set options for the Split Table refactoring method on SQL Server

This article explains how to set the options in the Split Table refactoring method on SQL Server, using ApexSQL Refactor, to gain the best performance based on your needs

ApexSQL Refactor - How to safely rename database objects without breaking dependencies

This video shows how to use the Safe rename feature in ApexSQL Refactor and how to easily rename database objects without breaking any dependencies

Changing SQL stored procedures and functions parameters without breaking dependencies

This article explains how to change parameters of your functions or stored procedures safely using ApexSQL Refactor

How to secure stored procedures against SQL injection

This article shows how to use ApexSQL Refactor to ensure all stored procedures are safe from SQL injection

ApexSQL Refactor 2017 – Screen shot tour

This article represents a screen shot tour of ApexSQL Refactor features with a brief description

See more
ApexSQL Redgate®
SQL Server editions
      SQL Server Management Studio
      Visual Studio
Formatting options 262 54
      Indentation 3 3
      Wrapping 1 1
      Aliases 4
      Capitalization 23 15
      Comments 8
      Data types 3
      Expressions 53 8
      Flow control 13 1
      Joins 16 3
      Lists 100
      Parentheses 10 2
      Spacing and Empty lines 8 5
      Statements 30 18
      Variables 4
Formatting features
      Batch SQL objects formatting
      Batch SQL scripts formatting
      Impact preview
      Profiles 3 1
      Encapsulate code as: Stored procedure
      Find unused variables and parameters
      Object name qualifying
      Safe rename
      Split table
      Add surrogate key
      Change parameters
      Copy SQL code
      Encapsulate code as: Table inline function
      Encapsulate code as: Scalar inline function
      Encapsulate code as: View
      Replace one-to-many-relationship
Free $369

ApexSQL Refactor 2016.01

Redgate® SQL Prompt 7

Comparison was conducted on January 20, 2016

Redgate® SQL Prompt also includes Auto-complete. For a comparison of this functionality set click here

Disclaimer: All product and company names are trademarks or registered® trademarks of their respective holders.
ApexSQL is not affiliated, associated, authorized, endorsed by, or in any way officially connected with other companies listed or any of their subsidiaries or affiliates


The ApexSQL Refactor is a great help, and I'm glad to have found something that works well and is easy!

Alex Gadea

Sr. VP of Operations

Hostcentric Inc.

I'm a user of ApexSQL Refactor and I find it a really wonderful product.


Software Developer Consultant

I tried the ApexSQL Refactor product and liked it a lot. This is something I have been thinking would make my life a lot easier.

Mathias Hedlund

System Developer

Jeeves Information Systems AB

I used ApexSQL Complete and ApexSQL Refactor. Both are well designed and include all the modern feature compare to other competitors. I found tons of customization options that makes your tools powerful.

Mohammad Sanati

Software & Database developer

I’ve been using ApexSQL Refactor for about three years now and have found it to be the most customizable of any product on the market today. And it is FREE! Kudos to your development team!

Fred Botts

Database Administrator


I use ApexSQL Refactor for a couple of years and it helped me a lot in designing and throubleshooting stored procedures and long queries. Thanks for the high and specific customization that I didn’t find in other free products.

Alessandro Losi


ApexSQL Refactor is essential to keeping formatting standards on my team without getting overwhelmed. Everyone can format as they want, but when it’s production-ready, it all fits the standard. I reach for the formatter after every edit; it’s second-nature.

Steven Hibble

Senior Database Developer



See all of our other
Killer free tools


Script, file and folder comparison

Learn more


Database object decryption

Learn more

Plan analysis

Query execution plan analysis

Learn more


Improved SQL coding and productivity

Learn more


Multi-database script execution

Learn more


SQL text and object search

Learn more

Database lifecycle management (DLM)

SQL Server continuous integration (CI) and delivery (CD)

Learn more